What where clause can I use to select records that are one hour ago or fresher using a DATETIME
timestamp?
Something like this? I assume an DATETIME timestamp
is an DATETIME field.
SELECT * FROM table WHERE datetimefield >= DATE_SUB(NOW(), INTERVAL 1 HOUR)
For more information check MySQL's date/time functions.
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