I have a time stamp in a MySQL database that looks like this:
2011-02-23 20:39:49
How can I detect if a certain amount of time has passed since the creation of that timestamp. In other words if the timestamp was created on February 23, 2010 at 8:39:43 P.M. how can I detect if exactly 10 days (240 hours) have passed since the creation of this timestamp? How to do this in PHP?
SELECT *
FROM table
WHERE timestampcol < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 10 DAY)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With