MySQL Tutorial/Date Time Functions/TIME
Версия от 13:44, 26 мая 2010; (обсуждение)
SELECT TIME("2003-02:03.000123");
mysql>
mysql> SELECT TIME("2003-12-31 01:02:03.000123");
+------------------------------------+
| TIME("2003-12-31 01:02:03.000123") |
+------------------------------------+
| 01:02:03.000123 |
+------------------------------------+
1 row in set (0.00 sec)
mysql>
TIME(expr) extracts the time part of the time or datetime expression expr and returns it as a string.
mysql>
mysql> SELECT TIME("2003-12-31 01:02:03");
+-----------------------------+
| TIME("2003-12-31 01:02:03") |
+-----------------------------+
| 01:02:03 |
+-----------------------------+
1 row in set (0.00 sec)