I have a clause in mysql query to select with a timestamp of 3 days ago, to the nearest day:
WHERE TO_DAYS(wit_matches.created) = TO_DAYS(NOW() - INTERVAL 3 DAY))
I want to change this so that it selects rows with a timetamp of 3 days about, but to the nearest hour – i.e. 72 hours to the nearest hour (this is a cron job that will run ones per hour).
What’s the best way of achieving this?
You can try this.