MONTH() extracts the month component from a date expression, returning it as an integer between 1 and 12. This function is useful for date-based calculations, filtering, and reporting where you need to work with the month portion of a date value.
MONTH(date)
MONTH() returns an integer between 1 and 12, or 0 for NULL dates
MONTH(DATE("11/22/2007")) = 11 (November)
MONTH(DATE(2007, 7, 4)) = 7 (July)
MONTH(DATE("2025-01-01")) = 1 (January)
MONTH(DATE("2025-12-31")) = 12 (December)
MONTH(CURDATE()) = 3 (if run in March)
MONTH(NULL) = 0 (NULL handling)