The DAY function

Returns the day of the month of a date, a number from 1 to 31.

Syntax

DAY(serial_number)
serial_number
The date to take the day from.

Examples

B1=DAY(DATE(2024,3,15))
AB
115
B1=DAY(EOMONTH(DATE(2024,2,10),0))
AB
129
B1=DAY(EOMONTH(DATE(2024,3,15),0))-DAY(DATE(2024,3,15))
AB
116

Practice DAY

Questions

How do I get the number of days in a month?

Find the last day of the month with EOMONTH and take its day, as in =DAY(EOMONTH(A2,0)). For February 2024 that gives 29.

Why does DAY return

The cell holds text that Excel does not read as a date. Turn it into a date first, for example with DATEVALUE or DATE.

Related functions