Example
Convert a time value into seconds:
SELECT TIME_TO_SEC("19:30:10");
Definition and Usage
The TIME_TO_SEC() function converts a time value into seconds.
Syntax
TIME_TO_SEC(time)
Convert a time value into seconds:
SELECT TIME_TO_SEC("19:30:10");
The TIME_TO_SEC() function converts a time value into seconds.
TIME_TO_SEC(time)
Return a time value based on a specified seconds value:
SELECT SEC_TO_TIME(1);
The SEC_TO_TIME() function returns a time value (in format HH:MM:SS) based on the specified seconds.
SEC_TO_TIME(seconds)