You can:
data want;
set have;
if date='ununkunkk' then sasdate=.;
else if date=:'ukunk' then sasdate=input(cats('31dec',substr(date,6,4)),date9.);
else if date=:'uk' then sasdate=intnx('month',input(substr(date,3,7),monyy7.),0,'end');
else sasdate=input(date,date9.);
format sasdate date9.;
run;
You did provide your sample data inside a working data step - thanks. BUT ...
Please make it viewable by using the insert code icon ("running man") rather than as an attachment.
... View more