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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

QUERY OF FIELD WITH DATE MORE THAN TWO DAYS OLD 1

Status
Not open for further replies.

netrusher

Technical User
Feb 13, 2005
952
US
I have a form that as a field called CurrentDate. The form tracks issues we find on files submiited. What I want to do with a query is to show all issues that are older than 48 hours of the CurrentDate field. That Current Date field will of course have different dates. If the CurrentDate Field=3/5/06 and today's date is 3/8/06 then I would would that record to show in the Query. Any suggestions?
 
If your date field is just a date (i.e. no hours:minutes:seconds) then
Code:
WHERE CurrentDate <= Date() - 2

If it is a full timestamp then

Code:
WHERE CurrentDate <= DateAdd ("h", -48, Now())
 
In the criteria cell of CurrentDate:
<=Now()-2

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top