Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

General Date Criteria 1

Status
Not open for further replies.

smoker1

Programmer
Jun 18, 2001
76
US
In my linked table, there is a general date field (7/23/01 10:59 AM). I am writing a query for a real-time report & therefore, need to query the fields whose date criteria equals the current date. I originally tried =Now() which didn't work. Entering #7/23/01# works, but it doesn't serve us purpose when the report is run tomorrow needing tomorrow's date.

Is there anyway to avoid changing the date every day?

Thank you for your information!

Angela
 
The Now() function didn't work because it also returns the time which will probably not match anything in your table.

Here is a sample WHERE clause that does the principle of what you are asking...

WHERE (((Format([BookDate],"mm/dd/yyyy"))=Format(Now(),"mm/dd/yyyy")));

I think there is probably even a faster way, but I can't think of it right now.

Gary
gwinn7
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top