Access Access 2010 - Date()-1 and times in query

Joined
Sep 1, 2014
Messages
2
Reaction score
0
Hi,

I am working with a database that is added to every day and I need to be able to pull out those records that apply to an overnight shift. The start time is given as dd/mm/yyyy hh:mm:ss and I want to be able to select all the records for shifts that started between 19:00 on the day before and 06:00 of the morning I run the query.

As this needs to be done everyday I was hoping that a query could use the criteria of Date()-1 and Date() along with the times to select those records, so I have tried this (and a few variations of this) but nothing has worked so far

SELECT Table1
WHERE StartTime BETWEEN Date()-1 #19:00:00# And Date() #06:00:00#

Can anyone help me with this?

Many thanks!
 
Back
Top