How to get hours and minutes from 'datetime.timedelta' object?
Lad
python at hope.cz
Mon Aug 7 04:55:42 EDT 2006
Hello,
what is the best /easest way how to get number of hours and minutes
from a timedelta object?
Let's say we have
aa=datetime.datetime(2006, 7, 29, 16, 13, 56, 609000)
bb=datetime.datetime(2006, 8, 3, 17, 59, 36, 46000)
so
c=bb-aa
will be
datetime.timedelta(5, 6339, 437000)
I can easily get days ( c.days)
but
I still can not figure out how easily to get hours and minutes
Any idea?
Thank you for help
L.
More information about the Python-list
mailing list