MySQL Tutorial/Date Time Functions/TIME TO SEC
Версия от 13:44, 26 мая 2010; (обсуждение)
SELECT TIME_TO_SEC("00:39:38");
mysql>
mysql>
mysql> SELECT TIME_TO_SEC("00:39:38");
+-------------------------+
| TIME_TO_SEC("00:39:38") |
+-------------------------+
| 2378 |
+-------------------------+
1 row in set (0.00 sec)
mysql>
TIME_TO_SEC(time) returns the time argument, converted to seconds.
mysql>
mysql> SELECT TIME_TO_SEC("22:23:00");
+-------------------------+
| TIME_TO_SEC("22:23:00") |
+-------------------------+
| 80580 |
+-------------------------+
1 row in set (0.00 sec)