MySQL 8.4
SECOND(time)- time
- Time or datetimeTIME
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.4
SELECT SECOND('2022-06-16 16:37:03');Fractions of a second dropped
MySQL 8.4
SELECT SECOND('16:37:03.75');