DAY()
DAY(date)This function returns the day of the month for a given date. It’s available as of version 4.1.1 of MySQL and is synonymous with the DAYOFMONTH() function, described later. Here is an example:
SELECT DAY('2008-12-15')
AS 'Day';
+-------+
| Day |
+-------+
| 15 |
+-------+This function is more meaningful when applied to a date column where the date is unknown before entering the SQL statement.