I need help with converting time to a readable format. My time
array (has 580 elements) is # of days since January 1st, 1900. How do I convert that to a normal time format (ie mm-dd-yyyy)?
例如,输入时间为43,887,输出应为02-27-2020。
谢谢!
I need help with converting time to a readable format. My time
array (has 580 elements) is # of days since January 1st, 1900. How do I convert that to a normal time format (ie mm-dd-yyyy)?
例如,输入时间为43,887,输出应为02-27-2020。
谢谢!
您可以使用datetime.datetime类可以为您提供帮助。如果将这些值视为整数天(您无需指定它们是什么),则可以使用以下方法。