Jump to content

Query to find the most recent date


only1perky

Recommended Posts

Hi Guys,

 

I have a mysql table that stores date and time in a field in the format '19-08-09 11:56', I need to use a query to get the date that is closest to the current date, how would I do so?

 

I've tried using SELECT MAX(datetime) but for some reason this is not pulling the most recent field.

 

Any help would be appreciated.

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/174339-query-to-find-the-most-recent-date/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.