Hello,
I need some help converting a numeric variable into a SAS date variable.
I am trying to get the last day of the month into a new variable. The original variable is "Date_Collect" which is a date variable, then I used the intnx function to grab the last day of the month. The step I am struggling with is converting the lastday variable into a SAS date variable instead of a numeric variable.
When I run this code, lastday_date is entirely blank.
Any ideas?
data want;
set have;
lastday_num=intnx('month',Date_Collect,0,'E');
lastday_date=input(put(lastday_num,date8.),yymmdd8.);
format lastday_date date8.;
run;
... View more