SECOND() extracts the second component from a date value. This function is useful for time-based analysis, filtering, and calculations where you need to work with the seconds portion of a timestamp.
SECOND(date)
SECOND() returns an integer
// Extract seconds from a specific date and time
SECOND(DATE(2007, 07, 04, 12, 30, 22)) = 22
// Extract seconds from another date and time
SECOND(DATE(2007, 12, 25, 8, 10, 20)) = 20
// Additional examples
SECOND(DATE(2024, 01, 01, 00, 00, 59)) = 59
SECOND(DATE(2024, 01, 01, 23, 59, 00)) = 0