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!

Returning records between two times

Status
Not open for further replies.

primagic

IS-IT--Management
Jul 24, 2008
476
GB
I have a datetime field in a table.

I want to be able to retrieve all records between the hours between 09:00AM And 12:00PM (Midday) on any given date.

What criteria do I write?

I have tried

Code:
Between #09:00:00 AM# And #12:00:00 PM#

But returns no records
 



Hi,

That's because the Date/Time field has BOTH date & time. Foir instance, right now it is 40574.84268 in North Texas which is 1/31/2011 20:13.

So "any given date" must ALSO be included in some way in your query.

Please post ALL you SQL.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top