【发布时间】:2019-05-25 11:25:00
【问题描述】:
我看到 excel 用特定的序列号识别日期。例如:
09/07/2018 = 43290
10/07/2018 = 43291
我知道我们使用 DATEVALUE 、 VALUE 和 TEXT 函数在这些类型之间进行转换。
但是这种转换背后的逻辑是什么?为什么43290 换成09/07/2018?
另外,如果我在 dataframe (Python) 中有一个数字格式的这些日期列表,我如何将这个数字转换为日期格式?
与时间类似,我看到十进制值代替了常规时间格式。这些时间转换背后的逻辑是什么?
在 cmets 中给出的以下问题提供了信息,但没有回答我关于日期和文本格式之间转换背后的逻辑的问题: convert numerical representation of date (excel format) to python date and time, then split them into two seperate dataframe columns in pandas
【问题讨论】:
标签: python excel pandas datetime python-datetime