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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SPECIFY DATE/TIME IN CRITERIA FOR QRY WITH "GENERAL DATE" 1

Status
Not open for further replies.

floydpepper

Technical User
Jul 8, 2004
39
US
Ladies and Gents,
I have a dbase that records events based on date/time occurred, event type, etc. Right now I have a qry with criteria set to Between (Now()-1) and (Now()). How can I set the criteria to go from yesterday at 0430 (am) to Now() (time of qry)? Or set the criteria to 0430 to 0430 as a daily report? Thanks in advance for your patience and assistance.

Floyd P
 
Take a look at the DateSerial and TimeSerial functions. You may add their return values to obtain a DateTime value.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Try

Between DateValue(Date()-1 & " 6:00:00 AM") And Now()



Hope this helps.

OnTheFly
 
Sorry, I forgot to modify the time

Try this:

Between DateValue(Date()-1 & " 4:30:00 AM") And Now()




Hope this helps.

OnTheFly
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top