Syntax. DAY(serial_number)
Definition. This function extracts the number of a day from a date. The DAY() function returns an integer from 1 through 31.
Arguments
serial_number (required). The date for which the day number is calculated
Background. With this function, as with the YEAR() and MONTH() functions, you can extract a valid date and use its components for other calculations. Use the DAY() function to extract the day from a date.
Problems might occur if you enter dates as text. The values returned by the functions YEAR(), MONTH(), and DAY() correspond to the Gregorian calendar.
For more information about saving dates in Excel, see the section titled The Excel Date System in Chapter 2.
Example. You may want to use the Excel AutoFilter to look at the days in a birthday list. You can extract the day and put this in an auxiliary column. To do this, use the formula
=DAY(date)
=DAY("07/13/2008")
returns 13
.
=DAY("11/14/1959")
returns 14
.
=DAY("01/01/1900")
returns 1
.
=DAY("12/31/1899")
returns #VALUE!
.
=DAY("12/31/9999")
returns 31
.
=DAY("01/01/10000")
returns #VALUE!
.