Created
October 24, 2019 18:45
-
-
Save raninho/d4efac534ffc53a678e36f3ed84305cf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime, timedelta | |
if __name__ == "__main__": | |
date1 = "15:59:02" | |
date2 = "16:59:02" | |
d1 = datetime.strptime(date1, "%H:%M:%S") | |
d2 = datetime.strptime(date2, "%H:%M:%S") | |
d = d2 - d1 | |
print(d.total_seconds()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment