Skip to main content
Version: V1.0.0

TO_DAYS

Syntax​

TO_DAYS(date)

Description​

Returns the number of days since 0000-01-01 for the specified date value.

Examples​

SELECT TO_DAYS('2015-11-04'), TO_DAYS('20151104');
+-----------------------+---------------------+
| TO_DAYS('2015-11-04') | TO_DAYS('20151104') |
+-----------------------+---------------------+
| 736271 | 736271 |
+-----------------------+---------------------+
1 row in set (0.001 sec)