从CSV导入时更改日期格式 [英] Change date format when importing from CSV
问题描述
我有一个CSV文件,其日期格式为 yy / mm / dd
,但是Excel错误地读取为 dd / mm / yyyy
(例如2015年9月8日读为2008年9月15日)。
I have a CSV file where the date is formatted as yy/mm/dd
, but Excel is reading it wrongly as dd/mm/yyyy
(e.g. 8th September 2015 is read as 15th of September 2008).
我知道如何更改Excel 输出的格式,但如何更改用于解释CSV数据的格式?
I know how to change the format that Excel outputs, but how can I change the format it uses to interpret the CSV data?
如果可能,我想保留它到Excel,但我可以使用Python程序。
I'd like to keep it to Excel if possible, but I could work with a Python program.
推荐答案
选项3.正确导入
使用DATA,获取外部数据, DMY组合(第3步,共3个栏,下栏数据格式和日期)。
Option 3. Import it properly
Use DATA, Get External Data, From Text and when the wizard prompts you choose the appropriate DMY combination (Step 3 of 3, Under Column data format, and Date).
这篇关于从CSV导入时更改日期格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!