How To Query By Timestamp In Mysql 1
1
How To Query By Timestamp In Mysql 1
This guide will simply cover how to find a data set by its timestamp including ranges. It will apply to mysql field that are of the “timestamp” type.
DATE_SUB subtracts a specified time interval from a date. You can use DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 HOUR) to grab data from the most recent hour.