t1=datetime(2018,4,13)
t2=datetime.now()
print(type(t2-t1))
print("seconds",(t2-t1).seconds)
print("days",(t2-t1).days)
# print("hour",(t2-t1).hour)#沒有hour,minute
t1=datetime(2018,4,13)
t2=datetime.now()
print(type(t2-t1))
print("seconds",(t2-t1).seconds)
print("days",(t2-t1).days)
# print("hour",(t2-t1).hour)#沒有hour,minute
繼續運行 ?* 回憶上次內容 上次使用shell環境中的命令 命令 作用 c