You are viewing a single comment's thread. Return to all comments →
t1 = datetime.strptime(t1, "%a %d %b %Y %H:%M:%S %z") t2 = datetime.strptime(t2, "%a %d %b %Y %H:%M:%S %z")
if(t1>t2): x = abs((t1 - t2).seconds) y = abs((t1 - t2).days) else: x = abs((t2 - t1).seconds) y = abs((t2 - t1).days) return str(y*3600*24 + x)
Seems like cookies are disabled on this browser, please enable them to open this website
Time Delta
You are viewing a single comment's thread. Return to all comments →
t1 = datetime.strptime(t1, "%a %d %b %Y %H:%M:%S %z") t2 = datetime.strptime(t2, "%a %d %b %Y %H:%M:%S %z")