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?
How are you sending it to Excel?
Tom
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.
Thanks,
Jag
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).
Could you please change the format to ddmmyy10. ,
i believe DDMMYYS.10 is not a valid format.
Thanks,
Jag
sorry, it is DDMMYYS10., it was just my typing error here.
Yes,
as Jag said ,format name should be DDMMYYS10. instead of DDMMYYS.10
Thanks,
Sanjeev.K
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.
Tom
It helps! Thanks Tom!
Boey
Hi,
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.
HTH,
Naveen
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: