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

sql query to return records 45 days old

Status
Not open for further replies.

agmac

Programmer
Nov 16, 2007
4
US
Need help with an sql query that returns only those records in a table that are 45 days old.

The table does have a date/time column (called re_time) that used the now() function to place the date/time into it.

Agmac
 
I figured it out...

WHERE mycolumn > DATEADD('d', -45, now())

Works using ASP and Access DB for those out there that might need to know this..

Agmac
 
A simpler way in JetSQL:
WHERE mycolumn > Date()-45

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top