Dates gooing backwards

  • Thread starter Thread starter Timothy Millar
  • Start date Start date
T

Timothy Millar

I am running Access 2003 on XP Professional. I need a query to pull records
from Now() backwards to a set number of hours such as 12 hours, 24 hours, 48
hours and 72 hours but I am not sure how to do this. Can anyone help me?
Thank you
 
Assumign you have a date/time field in your query, enter Criteria under it
like this:
= DateAdd("h", [How many hours ago], Now())

If you don't want Access prompting you for the number of hours when you run
the query, just put the actual number in place of:
[How many hours ago]
 
Now() - .5 is 12 hours
Now() - 1 is 24 hours
Now() - 2 is 48 hours
Now() - 3 is 72 hours
 
Back
Top