Mega Code Archive
Categories
/
MySQL Tutorial
/
Date Time Functions
TO_DAYS(date) returns a day number (the number of days since year 0)
mysql> mysql> SELECT TO_DAYS(950501); +-----------------+ | TO_DAYS(950501) | +-----------------+ | 728779 | +-----------------+ 1 row in set (0.00 sec) mysql>