UNIX_TIMESTAMP( ) can convert DATE values to seconds.
mysql>
mysql> SELECT CURDATE( ), FROM_UNIXTIME(UNIX_TIMESTAMP(CURDATE( )));
+------------+-------------------------------------------+
| CURDATE( ) | FROM_UNIXTIME(UNIX_TIMESTAMP(CURDATE( ))) |
+------------+-------------------------------------------+
| 2011-10-03 | 2011-10-03 00:00:00 |
+------------+-------------------------------------------+
1 row in set (0.00 sec)
mysql>
Related examples in the same category