MySQL 8.1
SECOND(time)Parameters
- timeTIME
- Time or datetime
Return value
An integer from 0 to 59; fractional seconds are dropped; NULL if the value is not recognized
Examples
Seconds from a date and time
MySQL 8.1
SELECT SECOND('2022-06-16 16:37:03');Fractions of a second dropped
MySQL 8.1
SELECT SECOND('16:37:03.75');