MySQL TIME()
MySQL 날짜함수, 시간함수
TIME()
- 시간(time)을 추출
TIME(expr)
의 형태
Extract the time part of the time or datetime expressioin expr and returns it as a string.
This function is unsafe for statement-based replication. A warning is logged if you use this function when binlog_format is set to STATEMENT.
mysql> SELECT TIME(NOW());
+-------------+
| TIME(NOW()) |
+-------------+
| 17:13:24 |
+-------------+
1 row in set (0.00 sec)
mysql> SELECT TIME('2020-04-03 13:11:12.99887766');
+--------------------------------------+
| TIME('2020-04-03 13:11:12.99887766') |
+--------------------------------------+
| 13:11:12.998878 |
+--------------------------------------+
1 row in set (0.00 sec)
mysql> SELECT TIME('2020-04-03 13:11:12');
+-----------------------------+
| TIME('2020-04-03 13:11:12') |
+-----------------------------+
| 13:11:12 |
+-----------------------------+
1 row in set (0.00 sec)