What is the difference - Date or Now (1 Viewer)

ptaylor-west

Registered User.
Local time
Today, 13:38
Joined
Aug 4, 2000
Messages
193
I have a query set up to extract info for follow up dates between 6 months and 6 months and 1 week from whatever current date I set it from. The criteria in the query is as follows: Between Date()+180 And Date()+187 this has worked fine until recently when I saved a version in Office 97 for a friend who gaot an error message when the query was ran, basically saying it didn't understand the "Date" I eventually solved the problem by using Now instead of Date but I don't understand why it should be different apart from Now uses the current time as well, can someone explain it to me?

[This message has been edited by ptaylor-west (edited 06-10-2002).]
 

CJBIRKIN

Drink!
Local time
Today, 13:38
Joined
May 10, 2002
Messages
256
Hello
I have had a simialr problem, for some reason Access in this case 2000 doesn't understand the date() function in the QBE.
I have been able to use it in a module just written as Date.
The difference between now() and date() as you know is that date gives you the date only i.e 12/02/2002 where as now() gives you the time as well as the date. I'm sorry I don't know why you cannot use date.

If you need to use now() you could try the function.
Format(Now(), "dddd/mmmm/yyyy")
to get just the date.

The string "dddd/mmmm/yyyy" can be varied (see the help file) to give you different formats of the date hence the functions name!!
Hope this helps

Chris

[This message has been edited by CJBIRKIN (edited 06-10-2002).]
 
R

Rich

Guest
Look here for missing references, this topic comes up regularly
 

ptaylor-west

Registered User.
Local time
Today, 13:38
Joined
Aug 4, 2000
Messages
193
Hi Rich

Your link to the reference did not appear can you send it again or let me know which reference is missing.

Thanks

Paul
 

ptaylor-west

Registered User.
Local time
Today, 13:38
Joined
Aug 4, 2000
Messages
193
Absolutely spot on with the missing reference.

Thank you both very much.
 

Users who are viewing this thread

Top Bottom