📜  python 将 datetime.timedelta 转换为秒 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:08.911000             🧑  作者: Mango

代码示例1
a_timedelta = datetime.timedelta(seconds=24*60*60)

timedelta_seconds = a_timedelta.total_seconds()

print(timedelta_seconds)
OUTPUT
86400.0