Convert a time value to its equivalent in seconds.
SELECT TIME_TO_SEC(“19:30:10”); |
The TIME_TO_SEC() function converts a given time value into its equivalent in seconds.
TIME_TO_SEC(time) |
Parameter |
Description |
time |
Required: The time value to convert |
Works in: |
From MySQL version 4.0 |
SELECT TIME_TO_SEC(“00:00:05”); |
Convert a given time value into seconds.
SELECT TIME_TO_SEC(“03:30:00.999999”); |
Convert a specified time value into its equivalent in seconds.
SELECT TIME_TO_SEC(“-03:30:00”); |