Retrieve the day of the month from a given date.
SELECT DAY(“2017-06-15”); |
The DAY() function retrieves the day of the month from a specified date, represented as a number ranging from 1 to 31.
Note: This function is equivalent to the DAYOFMONTH() function.
DAY(date) |
Parameter |
Description |
date |
Necessary. Specify the date from which to extract the day. |
Works in: |
From MySQL version 4.0 |
Retrieve the day of the month for a given date.
SELECT DAY(“2017-06-15 09:34:21”); |
Retrieve the day of the month for the current system date.
SELECT DAY(CURDATE()); |