CSV save changes date format

jray

New Member
Joined
Mar 13, 2008
Messages
46
When I save a spreadsheet file to CSV, this week, it converts from 12/01/2017 to 12/17/18. I have tried saving the Dec 1 17 date in different formats but everyone yields a 2018 after reopening.

Any help?
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
I think we will need more details.

What exactly does the field look like before you save it?
Is it really Date or Text?
What is the format of the cell?

How are you saving it?
How are you opening it (are you opening in Excel or a Text Editor)?

Hint: You should NEVER use Excel to open CSV file if you really want to see what is in there. This is because Excel does some automated conversions on the data. If you REALLY want to see what the data looks like in the CSV, open with a Text Editor like NotePad, WordPad, or some other text editor program.

If you need to open it Excel to work on it, open it this way:
Go into Excel first
Then go to the Data menu
Select Get External Data, and select the CSV/Text option (may vary slightly in different versions of Excel)
This should invoke the Import Text Wizard, where you can set the data type for each field.
If you do not want this field to change at all, use Text (instead of General or Date).
 
Upvote 0
Thanks for the speedy response.

Before saving the data entry bar will show 12/1/2017. In the spreadsheet for that cell it displays 1-Dec.
After saving the data has been changed to 12/1/2018.

I have been opening using Excel 2010. I will try to open using Notepad. I have not found the Import "Text Wizard yet but will look further.

Thanks
 
Upvote 0
When you save as Excel file as a CSV, it saves the formatted version (you can see this if your view it in NotePad).
So, it will not save "12/1/2017", but rather it will save "1-Dec".
When you import a date (and that is really what you are doing when you open a CSV file in Excel, you are importing it) with no year component, it assumes the current year (2018).
So if you want to maintain the 2017 year, you need to change your date format to one that includes the year before saving it to a CSV file.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,313
Members
452,634
Latest member
cpostell

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top