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? Quote Link to comment 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] Quote Link to comment Share on other sites More sharing options...
Dustin013 Posted June 24, 2008 Author Share Posted June 24, 2008 Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.