Apr 21 2021 02:21 AM
Hello! We have a problem with a csv file. We have a column which needs the formatting tt.mm.jjjj hh:mm Currently it is tt.mm.jj hh:mm (the year only has two digits instead of four). If we change it in the custom format setting and save the document, close it and open it again the formatting is the same as it was before, so again only with two digits instead of four. This is only the case for csv files, for xlsx files the custom formatting stays the same even after closing and opening it again, but we need the document in a csv format.
It would be great if someone could help me with that!
Apr 21 2021 03:01 AM
CSV files can't store format information.
Apr 21 2021 03:08 AM
Apr 21 2021 03:15 AM
Apr 21 2021 02:29 PM
Yes, CSV is actually text file. However, if open CSV in Excel, apply custom format to data, save file as CSV it shall save the data (as text) in the form of applied format. Another story is that if you open file again in Excel it could show you some data in your default locale format, but that's only visualization. You may check in Notepad that is the actual data.
So, depends on goals - to change the data or to show the data. If former it works. If latest it depends, when Excel format is most reliable.
See for example Formatting Dates for CSV Imports – Administration (echo360.com)