I have an extraction I did from a table and SAS has the date format correct on extract. Then I run a data step to drop some columns I will not need for the final export. The date field is still a normal date. Then I sort by the date and do an export to Excel and the date field writes to Excel in a numeric. I thought maybe I could do a
proc sort;
by date format=date9.;
run;
but that errors. So i tried doing a proc format of the date before export and that errors as well.
any suggestions how to format the date to be date9 prior to export so it will export right?