confused on calculating date difference in days.

krishnakant Mane researchbase at gmail.com
Tue Oct 16 09:51:42 EDT 2007


hello,
thanks all of you for providing valuable help.
right now I am confused about the delta object.
how can I extract the difference between two dates in terms of day
using the delta object?
I tried reading the python docs but did not understand the concept of
delta object and how can I measure the difference in terms of days
between two dates.
I expect that the days would be integers.
secondly the format of my date is actually "16/10/2007", and this is
all in varchar field inside a postgresql database.
I understand that datetime.datetime.strptime would convert this string
"16/10/2007" into a date object which I can then compare with the
current date created by datetime.now().
is that right?
if yes then please explain me how I can get the delta object to give
me results in days.
regards,
Krishnakant.



More information about the Python-list mailing list