12-17-2013 10:06 PM
I am having a problem of date output format when sending my list report to excel, the date format originally set in SAS EG has changed from DD/MM/YYYY to mixure of DD/MM/YYYY and MM/DD/YYYY. Any solution for this?
12-27-2013 04:30 AM
Were the dates in numeric format or character format.
if numeric, please check the format of the dates. If the format is fixed across the column then there should not be any problem in exported file.
If the format is not fixed, then the excel generated will have mixed formats. Could you please assign the fixed format to the column of date and check.
12-27-2013 04:46 AM
table on the left side is SAS list report output; table on the right side is exported excel output.
I have already fixed the format in SAS EG with DDMMYYS.10 but when sending to excel, the column shows the mixed format (date and character).
12-27-2013 12:04 PM
Yes, I've been able to replicate your problem. I'm guessing it's because SAS is sending the formatted value in the "dd/mm/yyyy" format, e.g. 01/02/2014, for Feb 1 2014, to excel. I've bumped into this a few times...any time excel sees "99/99/9999", it assumes mm/dd/yyyy as long as the first number isn't greater than 12.
I'm not sure of your requirements, but I was able to get the transfer to work by putting a format of date9. on my date column in the List Report task. This sends it to excel in an unambiguous 01feb2014 format, which excel recognizes. From there, you can format it in excel.
12-27-2013 04:41 AM
I'd like suggest you to
1. apply your desired format whether dd/mm/yyyy or mm/dd/yyyy by modifying the code using the format statement that should be written to the output datset. Safely, this should resolve.
2. Verify the results by checking with filter.
3. Then export to excel
I am guessing there might be an issue in permanently associating(storing) your desired Date format in the descriptor portion of the output dataset, which you are trying to export to excel.