11-06-2014 04:29 PM
I am using a proc import step to load an xls file to sas dataset.
Now I want to export everything as text...how to do it? By default, it is importing a date like 30/06/2014 as 30JUN2014 and i don't want to reconvert it later to right format. I just want the original text.
11-06-2014 06:47 PM
I don't know but it sounds like it is trying to be helpful. It sees what it guesses must be a date, you don't say anything, and it says OK, I'll make it a date because I am helpful.
I would guess if you import the Excel sheet as CSV you would get more control and coudl tell SAS what to do instead of defaulting and letting the program guess. If the data came in as text it might export as text. I would think you could convert it in SAS before exporting to whatever you want in any event.
Maybe seeing your PROC IMPORT statement would help?
11-06-2014 08:05 PM
Can you provide an example? In general I do not see SAS changing values on import. That is something that is much more likely to happen in Excel when trying to read in a text files like a CSV file.
11-07-2014 02:28 AM
When the import procedure sees something that looks like a date, it reads this into a numeric variable and assigns the default date9. format, which displays the date as you see it. You just need to assign the ddmmyy10. format before exporting.