Hi Everyone,
I have a column with date and I want to create a new column for the same date in the next 3 month.
So '5MAY2022'd will have '5AUG2022'd and '5NOV2022' will have '5FEB2023'd.
Can you please help?
Thank you,
HHC
data have;
format my_date date9.;
input my_date date9.;
datalines;
05MAY2022
05NOV2022
;
run;
data want;
set have;
newdate=intnx('month',my_date,3,'s');
format newdate date9.;
run;
data want;
set have;
newdate=intnx('month',my_date,3,'s');
format newdate date9.;
run;
Thank you,
It works perfectly.
HHC
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.