top of page

24. Last Day of Next Month

Description

Determines what the last day of next month is.

Code

DATE OF(
1 ,
MONTH OF( DateVar + 2 MONTHS ),
YEAR OF( DateVar + 2 MONTHS )
) - 1 DAYS

Explanation

The computation uses a date variable, DateVar as the evaluation date. TODAY could just as easily be used.

The computation first calculates what the first day of the month will be two months after the evaluation date. Knowing this date, we then subtract one day, giving us the last day of next month.

bottom of page