To create a SAS date value where the Date9 or any other date format will apply correctly, you need a day, month and year value. What day and month do you expect to have in the result when only a year , apparently, is supplied? Are the year only values always provided as 4 digits?
Do you have any other layouts for that character date value? We may need to see more to get code that works more completely.
This provides an example of how to read those two values into dates. You get to pick the month and day to use as the default for the MDY function that turns numeric month, day and year into a date. I used January 1 for the example.
data example;
input BRTHDTC :$15.;
if length(BRTHDTC)=4 then brthdt = mdy(1,1, input(BRTHDTC,4.));
else brthdt=input(BRTHDTC,yymmdd10.);
format brthdt date9.;
datalines;
1988-02-23
1973
;
... View more