ID EN
Date and Time Functions

TIME_TO_SEC(time)

MySQL 8.4

Returns the time argument, converted to seconds. Returns NULL if time is NULL.

Syntax

MYSQL
SELECT TIME_TO_SEC('22:23:00');
80580
SELECT TIME_TO_SEC('00:39:38');
2378

Examples

Example
MYSQL
SELECT TIME_TO_SEC('22:23:00');
80580
SELECT TIME_TO_SEC('00:39:38');
2378