Deal with two-digit-year value : TO_DAYS « Date Time Functions « MySQL Tutorial






mysql>
mysql> SELECT TO_DAYS('1997-10-07'), TO_DAYS('97-10-07');
+-----------------------+---------------------+
| TO_DAYS('1997-10-07') | TO_DAYS('97-10-07') |
+-----------------------+---------------------+
|                729669 |              729669 |
+-----------------------+---------------------+
1 row in set (0.00 sec)

mysql>








14.50.TO_DAYS
14.50.1.TO_DAYS(date) returns a day number (the number of days since year 0).
14.50.2.SELECT TO_DAYS('1997-10-07');
14.50.3.Deal with two-digit-year value