Question How do I print out the remaining hours of overtime
Example: I have to be at work for 8 hours, and if my time goes over 8 hours as shown in OUTPUT then I just wanna have the 00:03:00 printed out.. Meaning that I have 3 min overtime that day.
from datetime import datetime
s1 = '07:15:00'
s2 = '16:18:00'
FMT = '%H:%M:%S'
tdelta = datetime.strptime(s2, FMT) - datetime.strptime(s1, FMT)
print(tdelta)
OUTPUT
9:03:00