DAY() extracts the day of the month from a date expression, returning it as an integer between 1 and 31. This function is useful for date-based calculations, filtering, and reporting where you need to work with specific days of the month.
DAY(date)
DAY() returns an integer between 1 and 31, or 0 for NULL dates
DAY(DATE("12/25/2025")) = 25
DAY(DATE(2025, 12, 25)) = 25
DAY(DATE("2025-01-01")) = 1
DAY(DATE("2025-02-28")) = 28
DAY(DATE("2025-03-31")) = 31
DAY(CURDATE()) = 19 (if run on March 19, 2025)
DAY(NULL) = 0