Hi All,
I'm having a trouble to keep my date format after exporting to csv.
I'm generating date using the following format yyyy-mm-dd but when i open the exported csv file it gives me : dd/mm/yyyy.
I'm using the SAS EG version 7.13 HF3 : Task/Data/Copy files feature to export.
so,please any help will be appreciated.
Thanks
@korssane wrote:
Hi ,
Thanks for the quick reply .
I'm opening the file using Excel.
the actual SAS format name of the variable(s) in the dataset
Type : Date
length : 8
Format : YYMMDD10.
Informat is blank
pls let me know if you need other info.
thanks
Did you try opening it in another application such as Notepad or Wordpad? If you use one of these then you'll likely see dates is yyyy-mm-dd appearance.
I repeat: Excel will change the appearance of values. One option is to not worry about it and just the column appearance in Excel using the format cells for the entire column.
Did you open the result in Excel or a text editor? Excel is infamous for reformatting things.
You may have to tell us the actual SAS format name of the variable(s) in the dataset if the above is not the case.
Hi ,
Thanks for the quick reply .
I'm opening the file using Excel.
the actual SAS format name of the variable(s) in the dataset
Type : Date
length : 8
Format : YYMMDD10.
Informat is blank
pls let me know if you need other info.
thanks
@korssane wrote:
Hi ,
Thanks for the quick reply .
I'm opening the file using Excel.
the actual SAS format name of the variable(s) in the dataset
Type : Date
length : 8
Format : YYMMDD10.
Informat is blank
pls let me know if you need other info.
thanks
Did you try opening it in another application such as Notepad or Wordpad? If you use one of these then you'll likely see dates is yyyy-mm-dd appearance.
I repeat: Excel will change the appearance of values. One option is to not worry about it and just the column appearance in Excel using the format cells for the entire column.
Excel is the culprit here. At least it recognized your dates as such.
Excel will format dates according to the Windows locale setting.
After opening the file, change the format for the column to the one you desire. Or change the system's date format setting.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.