Find latest date

leebo1973

Registered User.
Local time
Today, 22:03
Joined
Jan 18, 2014
Messages
25
Good afternoon

I have a list of project, each of which have dates which work were carried out on them. Each project can have more than one date. I want to be able to find the last date that any work was carried out, and then calculate how many days have passed since that happened.

All help appreciated

Thanks
 
select max(yourdate) as lastdate, date() - max(yourdate) as dayspast from yourtable

Something like that?
 
Thanks for the reply

However, when a project has more than one entry, how do I find the latest entry on that project??
 
By taking this query I gave you and joining it back to your Original table.
 
Maybe i am sounding think, but not sure what you mean???
 
Take the query I gave you earlier, add your projectid (or some identifier), save it as qryMaxDate (or any name you see fit)
Make a new query, add yourtable, add this qryMaxDate join them and done....
 

Users who are viewing this thread

Back
Top Bottom