21/02/13 22:52:40.18 De6EzIPK.net
ある時間が現在時刻より何時間経ってるかていうのを知りたいんだが
from datetime import datetime
d="2020/06/02 23:42"
x=datetime.strptime(d, '%Y/%m/%d %H:%M')
y=datetime.datetime.now()
print(x,' ',y)
last_time=(y-x)/3600
てやってみたんだが
type object 'datetime.datetime' has no attribute 'datetime'
というエラー
y=datetime.now()にすると
last_timeが1:42:23.156836という値
何百時間ていう数値を出せないんですか?