3 个回答

1

我在Daniweb上的帖子:
将日期字符串转换为日期对象,把秒数转换为可读的字符串

你似乎只考虑了时间的部分,其实通过简单的分割就能轻松转换。

2

使用 datetime.datetime.strptime() 方法

撰写回答