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

Filter records by time range within a date range

Status
Not open for further replies.

jkupov

Technical User
Apr 28, 2004
101
US
What is the easiest way to do this? I want to select all records (using a date/time field)that are between 8am and 5pm from 10/01/05 - 10/31/05.

I don't want to view the records where this field is stamped with times outside of business hours.

Thank you!
 
WHERE ([date/time field] Between #2005-10-01 08:00:00# And #2005-10-31 17:00:00#)
AND (Format([date/time field],'hh:nn:ss') Between '08:00:00' And '17:00:00')

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top