Python 3 Find Difference Between Two Timestamps in Days

code.py

import datetime

min = min/1000           #removing milli seconds
max = max/1000

min = datetime.datetime.fromtimestamp(min)
max = datetime.datetime.fromtimestamp(max)

print("Total Days : " + str((max-min).days))

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.