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

How to get most recent Date.

Status
Not open for further replies.

needadvice

Programmer
Apr 7, 2002
145
US
I have a query to run a report that selects dates more than 650 days old. The user wants only the most recent date of the dates more than 650 days old. How do I build this into the query design?
Any help appreciated.
 
This SQL will give you the most recent date of dates in a table that are more than 650 days old:
SELECT Max(A.YourDateField) AS MaxYourDateField
FROM tblYourTablename as A
HAVING (((Max(A.YourDateField))<DateAdd(&quot;d&quot;,-650,Date())));


Let me know if you need more from this query.

Bob Scriver
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top