RE: Adding 1 month to a date
https://community.altair.com/discussion/19909?tab=all
This gets very messy because adding a month to 2025-01-31, yeilds the invalid date of 2025-02-31.
You would have to handle all transitions from longer months to shorter months.
However you can easily go to the first day of the next month, and handle year changes.
INPUT
data dates;
input date_num e8601da.;
cards4;
2024-12-15
2024-07-25
2025-04-19
2024-01-29
;;;;
run;quit;
DATE (days since 1960-01-01)
23725
23582
23850
23039
23069
PROCESS
data want;
set dates;
current_date = put(date,e8601da.);
plus_1_month = put(INTNX('month', date, 1),e8601da.);
run;quit;
OUTPUT
CURRENT_ PLUS_1_
DATE DATE MONTH
23725 2024-12-15 2025-01-01
23582 2024-07-25 2024-08-01
23850 2025-04-19 2025-05-01
23039 2023-01-29 2023-02-01
23069 2023-02-28 2023-03-01