[Solved] How transform days to hours, minutes and seconds in Python


The timedelta object doesn’t have hours property. Only microseconds, seconds and days.

Use:

myTime="%02d:%02d:%02d.%06d" % (myTime.days*24 + myTime.seconds // 3600, (myTime.seconds % 3600) // 60, myTime.seconds % 60, myTime.microseconds)

3

solved How transform days to hours, minutes and seconds in Python