The EOMONTH function
Returns the last day of the month a number of months before or after a date. 0 gives the end of the same month.
Syntax
EOMONTH(start_date, months)- start_date
- The date to start from.
- months
- Months to move: 0 for this month, 1 for next, -1 for last.
Examples
B1=DAY(EOMONTH(DATE(2024,2,10),0))
| A | B | |
|---|---|---|
| 1 | 29 |
B1=MONTH(EOMONTH(DATE(2024,11,15),2))
| A | B | |
|---|---|---|
| 1 | 1 |