Time Calculation

N

Ndel40

I want to be able to run a query that looks at the current time and goes back to 7:00 PM on the previous day. Then returns all records greater than 7:00 PM on the previous day. I am using the followiung formula in the critera field that does not quite work
 
A

Allen Browne

Try:
= DateAdd("h", 19, Date() - 1)

The current date less one is yesterday.
Add 19 hours gives you 7pm yesterday.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Ndel40 said:
I want to be able to run a query that looks at the current time and goes
back to 7:00 PM on the previous day. Then returns all records greater than
7:00 PM on the previous day. I am using the followiung formula in the
critera field that does not quite work.
 
Top