PHP开发教程

MySQL curtime()函数

CURTIME()

返回当前时间以“HH:MM:SS'或'HHMMSS' 格式的值,具体格式是根据该函数是否用在字符串或数字语境中。该值表示在当前时区。

mysql> SELECT CURTIME();
+---------------------------------------------------------+
| CURTIME()                                               |
+---------------------------------------------------------+
| 23:50:26                                                |
+---------------------------------------------------------+
1 row in set (0.00 sec)

mysql> SELECT CURTIME() + 0;
+---------------------------------------------------------+
| CURTIME() + 0                                           |
+---------------------------------------------------------+
| 235026                                                  |
+---------------------------------------------------------+
1 row in set (0.00 sec)


Powered by PHP二次开发 ©2008-2017