Skip to main content
Version: V1.0.0

TIME_TO_SEC

Syntax

TIME_TO_SEC(time)

Description

Converts the time type parameter time to seconds.

Examples

SELECT TIME_TO_SEC('22:23:00');
+-------------------------+
| TIME_TO_SEC('22:23:00') |
+-------------------------+
| 80580 |
+-------------------------+
1 row in set (0.001 sec)

SELECT TIME_TO_SEC('00:39:38');
+-------------------------+
| TIME_TO_SEC('00:39:38') |
+-------------------------+
| 2378 |
+-------------------------+
1 row in set (0.000 sec)