How to find out a date/time difference

wittempj@hotmail.com martin.witte at gmail.com
Wed May 24 17:40:04 CEST 2006


And if you want the number of days:

py> d = datetime.datetime(2006,5,24,16,34) -
datetime.datetime(2006,5,23,12,1)
py> d.days
1
py> d = datetime.datetime(2006,5,24,16,34) -
datetime.datetime(2006,5,23,19,1)
py> d.days
0




More information about the Python-list mailing list