The TIME_TO_SEC() function converts the "Time" argument to its number of seconds.
The "Time" argument must be of type TIME or DATETIME.
If the argument is of the DATETIME type, the time portion is used for the calculation.
If the argument is of type DATE, the function returns 0.
If the argument is a string containing only a date, the function returns an incorrect value.
Microseconds contained in the argument are returned as a decimal with.
If the value for "Time" is invalid or NULL, the TIME_TO_SEC() function returns NULL. |