First, Is birthdate type numeric or character? If it is numeric, 09301999 is handled as 9301999. If it is character, quote is needed.
With that out of the way, for the actual code, try the following.
data have;
birthdate='19881231'; output;
birthdate='19670628'; output;
birthdate='09301999'; output;
run;
data want;
set have;
birthdatewant=input(birthdate,??yymmdd8.);
if birthdatewant=. then birthdatewant=input(birthdate,??mmddyy8.);
format birthdatewant yymmdd10.;/* date format as you want */
run;
... View more