PHP开发教程

MySQL time_to_sec()函数

TIME_TO_SEC(time)

返回 time 参数,转换成秒。

mysql> SELECT TIME_TO_SEC('22:23:00');
+---------------------------------------------------------+
| TIME_TO_SEC('22:23:00')                                 |
+---------------------------------------------------------+
| 80580                                                   |
+---------------------------------------------------------+
1 row in set (0.00 sec)


Powered by PHP二次开发 ©2008-2017