@VipinA wrote: Hi The number is 40694, date will be 31/5/2011
Best would be if you change your import step so that the Excel date gets converted into a SAS date value (stored in a numerical variable).
...but to give you exactly what you're asking for.
data have;
length var $10.;
var='40694';
run;
data _null_;
shiftval='01Jan1960'd -'01Jan1900'd+2;
call symputx('shiftval', shiftval);
stop;
run;
proc sql;
select
put(input(var,? best32.)-&shiftval,mmyyn6.) as var
from have
;
quit;
... View more