SQL
MySQL DAYOFMONTH() Function
Return the day of the month for a date: