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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top