Search code examples
sqlmysql

SQL check if timestamp is greater than 24 hours from now (MYSQL)


How to check if timestamp is greater than 24 hours from now with mysql?

DELETE FROM `users` WHERE `time` = ?

Update: date format — 2013-10-24 13:33:23


Solution

  • Try out this Query:

    SELECT * FROM news WHERE date >= now() + INTERVAL 1 DAY;