Syntax
DAY(serial_number)- serial_number
- The date to take the day from.
Examples
B1=DAY(DATE(2024,3,15))
| A | B | |
|---|---|---|
| 1 | 15 |
B1=DAY(EOMONTH(DATE(2024,2,10),0))
| A | B | |
|---|---|---|
| 1 | 29 |
B1=DAY(EOMONTH(DATE(2024,3,15),0))-DAY(DATE(2024,3,15))
| A | B | |
|---|---|---|
| 1 | 16 |
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.