Greetings!
What I have is a SAS data variable (e.g., 2015-03-07)
What I want is to add one year to the above variable (e.g., 2016-03-07)
When I used
DSDAT = intnx('year',DSDAT,1);
I got "2016-01-01", any idea why I did not get "2016-03-07"
Thanks
Try
DSDAT = intnx('year',DSDAT,1,'s');
's' stands for SAME meaning you are requesting to shift the default
Try
DSDAT = intnx('year',DSDAT,1,'s');
's' stands for SAME meaning you are requesting to shift the default
@novinosrin You are great help to me, thank you so much!
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: