Hi,
Changing date formats are so confusing!
I would like help changing a DOB format that is a SAS date, (e.g. 17673) to a meaningful date such as date10.
Thank you!
data _null_;
date= 17673;
date1=put(date,date9.);
date2=date;
format date2 date9.;
put _all_;
run;
data encounterdate;
set fy14merge;
dob1=input(dob,???);
format dob1 date10.;
run;
THis is the code I am trying to use...but not sure what to put in the ??? if I am working with a SAS date (e.g. 19632)
Thank you!
data encounterdate; set fy14merge; dob1=input(dob,???); format dob1 date10.; run; THis is the code I am trying to use...but not sure what to put in the ??? if I am working with a SAS date (e.g. 19632)
data encounterdate;
set fy14merge;
format dob date9.;
run;
Try the above. Also, please take the time to format your code properly.
You don't need input unless the value is a character and it seems to be a number.
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 16. 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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: