TIME_TO_SEC

2024-04-19 08:42:50  Updated

Syntax

TIME_TO_SEC(time)

Purpose

TIME_TO_SEC() converts a timestamp argument time into seconds.

Examples

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

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

Contact Us