Forum Discussion
Jackie64
May 19, 2021Copper Contributor
Excel changes custom format to a date when saving as a csv. File. How to get itnto stop?
Excel xlsx keeps converting a custom date, mm-dd-yyyy to the following format mm/dd/yyyy when saving as a csv file. How do I get it to stop, or how can I get this format added to the list of date form...
scondrill
Mar 18, 2023Copper Contributor
I'm having the same issue trying to save a date in this format: yyyy-mm-ddd hh:mm:ss in csv. I've tried all of the solutions/options mentioned in the previous threads, and excel reverts back to the old mm/dd/yyyy format after saving/reopening. This the the format required of Turbtax and I have hundreds of crypto transactions.
JoeUser2004
Mar 19, 2023Bronze Contributor
scondrill wrote: ``trying to save a date in this format: yyyy-mm-ddd hh:mm:ss in csv [....] excel reverts back to the old mm/dd/yyyy format after saving/reopening``
Again, the data is written into the CSV file in that form, if that is how the data was formatted (or it is text) when the CSV is saved.
Confirm by opening the CSV file in Notepad.
However, if we open the CSV file directly with Excel, Excel interpets the file data just as if we had typed them into a cell formatted as General.
To retain that original form, do not open the file directly with Excel.
Instead, import the CSV file using Data > Get From Text, and in Step 3, select Text for the column format.
However, that might have undesirable consequences.
If the imported data must be numeric, the only work-around is to re-assert the desired format after importing the data.