Python读取excel中日期/时间有误

比如excel中日期格式为 2020-1-6 14:20:25,读取到的格式为xldate='45444.2134314'

那么u需要在读取变量时,对日期进行转换

'offtime': xlrd.xldate.xldate_as_datetime(row[6].value)

另外,更加丰富的转换,还可以参见:

https://blog.csdn.net/dudu3332/article/details/111560111

猜你喜欢

转载自blog.csdn.net/figosoar/article/details/112316370