How do I subtract a starting time in hours and minutes (e.g. 2:30
) from an ending time in hours and minutes (e.g. 5:15
) in Python?
lengthOfDay=datetime(endh,endm) - datetime.timedelta(starth,startm)
How do I subtract a starting time in hours and minutes (e.g. 2:30
) from an ending time in hours and minutes (e.g. 5:15
) in Python?
lengthOfDay=datetime(endh,endm) - datetime.timedelta(starth,startm)