PHP开发教程

MySQL to_days()函数

TO_DAYS(date)

给定一个日期,返回一个天数(年为0以来的天数)。

mysql> SELECT TO_DAYS(950501);
+---------------------------------------------------------+
| TO_DAYS(950501)                                         |
+---------------------------------------------------------+
| 728779                                                  |
+---------------------------------------------------------+
1 row in set (0.00 sec)


Powered by PHP二次开发 ©2008-2017