Saving to CSV in Excel loses regional date format

前端 未结 8 1836
北海茫月
北海茫月 2020-12-17 15:59

I have a .xls I need to convert to .csv

The file contains some date columns. The format on the date is \"*14/03/2001\" which, according to Excel means the date respo

相关标签:
8条回答
  • 2020-12-17 16:28

    You can save your desired date format from Excel to .csv by following this procedure, hopefully an excel guru can refine further and reduce the number of steps:

    1. Create a new column DATE_TMP and set it equal to the =TEXT( oldcolumn, "date-format-arg" ) formula.

    For example, in your example if your dates were in column A the value in row 1 for this new column would be:

    =TEXT( A1, "dd/mm/yyyy" )

    1. Insert a blank column DATE_NEW next to your existing date column.

    2. Paste the contents of DATE_TMP into DATE_NEW using the "paste as value" option.

    3. Remove DATE_TMP and your existing date column, rename DATE_NEW to your old date column.

    4. Save as csv.

    0 讨论(0)
  • 2020-12-17 16:30

    If you use a Custom format, rather than one of the pre-selected Date formats, the export to CSV will keep your selected format. Otherwise it defaults back to the US format

    0 讨论(0)
提交回复
热议问题