Hi All,
I have a column with all strings in a date format such as
28/08/1969
19/04/1977
26/07/1956
26/06/1992
11/04/1984
data outputdata;
set inputdata ;
newvar = input(dob, mmddyy10.);
format newvar mmddyy10.;
run;
When I use the following code only some of the strings get converted to an actual SAS date.
28/08/1969 .
19/04/1977 .
26/07/1956 .
26/06/1992 .
11/04/1984 11/04/1984
Does anyone know why SAS is converting some of them but not others?
newvar = input(dob, mmddyy10.);
Look very very carefully. This is not the right informat to use with your data. Can you figure out why? The proper informat is ... well, after you identify why that informat isn't correct to use on your data, I leave that to you to figure out the correct informat as a homework assignment.
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!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.