Dustin013 Posted June 24, 2008 Share Posted June 24, 2008 I am using the date option in mySQL and I want to tell php to check to see if the date is 72 hours old or newer. Is that possible? 2008-06-23 17:50:17 is the format of the date entered into MySQL database. How would I go about writing a script that would check to see if the date was at at most 71hrs, 59min, 59sec old? Link to comment https://forums.phpfreaks.com/topic/111588-validating-a-date/ Share on other sites More sharing options...
hitman6003 Posted June 24, 2008 Share Posted June 24, 2008 You can use MySQL... SELECT * FROM tablename WHERE datecolumn > DATE_SUB(datecolumn, 72 HOUR)[/ode] Link to comment https://forums.phpfreaks.com/topic/111588-validating-a-date/#findComment-572780 Share on other sites More sharing options...
Dustin013 Posted June 24, 2008 Author Share Posted June 24, 2008 Thanks! Link to comment https://forums.phpfreaks.com/topic/111588-validating-a-date/#findComment-572787 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.