You are on page 1of 1

data ColumnConverted;

drop compress_date substr_year substr_day substr_month;


format 'My New SAS Date'n mmddyyD10.;
set WORK.SAMPLE_DATA;
compress_date = compress(ddmmyy,' /-\._:,*');
substr_day = substr(compress_date,1,2);
substr_month = substr(compress_date,3,2);
substr_year = substr(compress_date,5,2);
'My New SAS Date'n = input(compress(substr_month||substr_day||
substr_year),anydtdte6.);
run;
proc print data=ColumnConverted;
run;

You might also like