Please provide your interpretation of what those strings of digits mean.
The first one might by MMYY ? Are any of them in the form MYY (meaning January thru September)?
Looks like 2 is in YYYYMMDD order.
And perhaps 3 is in YYYYMM order?
Do you want to set the ones without day of the month to the first day of the month? Also for the second one where you DO have a day of the month do you want to also convert it to the first day of month?
data want ;
set have ;
select (length(cats(FAKE_DATE)));
when (3,4) REAL_DATE=input('01'||put(FAKE_DATE,z4.),ddmmyy6.);
when (8) REAL_DATE=intnx('month',input(put(FAKE_DATE,z8.),yymmdd8.),0,'b');
when (6) REAL_DATE=input(put(FAKE_DATE,z6.),yymmn6.);
otherwise do;
put 'WARNING: Invalid DATE value. ' FAKE_DATE= ;
end;
end;
format REAL_DATE yymm7. ;
run;