mysql 时间处理

 

mysql> select curtime();
+-----------+
| curtime() |
+-----------+
| 19:43:34  |
+-----------+
1 row in set (0.00 sec)


mysql> select time(now());
+-------------+
| time(now()) |
+-------------+
| 19:43:34    |
+-------------+
1 row in set (0.00 sec)


mysql> select hour(curtime());
+-----------------+
| hour(curtime()) |
+-----------------+
|              19 |
+-----------------+
1 row in set (0.00 sec)


mysql> select minute(curtime());
+-------------------+
| minute(curtime()) |
+-------------------+
|                43 |
+-------------------+
1 row in set (0.00 sec)


mysql> select second(curtime());
+-------------------+
| second(curtime()) |
+-------------------+
|                34 |
+-------------------+
1 row in set (0.00 sec)

 

 

posted @ 2019-08-04 20:13  anobscureretreat  阅读(151)  评论(0编辑  收藏  举报