There are many rules you need consider about.
data Dte;
input birthdate $10.;
cards;
Jan1975
1977
021978
;
run;
data want;
set Dte;
if prxmatch('/\d\d\w\w\w\d\d\d\d/',birthdate ) then new=input(birthdate,date9.);
else if prxmatch('/\w\w\w\d\d\d\d/',birthdate ) then new=input('11'||birthdate,date9.);
else if prxmatch('/\d\d\d\d\d\d/',birthdate ) then new=input(substr(birthdate,1,2)||'Jul'||substr(birthdate,3),date9.);
else if prxmatch('/\d\d\d\d/',birthdate ) then new=input('11Jul'||birthdate,date9.);
format new date9.;
run;
... View more