Mysql
 sql >> Datenbank >  >> RDS >> Mysql

MYSQL Runde die datetime auf 15 Minuten

SELECT NOW() x,FROM_UNIXTIME(FLOOR(UNIX_TIMESTAMP(NOW())/900)*900) y;
+---------------------+---------------------+
| x                   | y                   |
+---------------------+---------------------+
| 2013-10-10 09:50:20 | 2013-10-10 09:45:00 |
+---------------------+---------------------+