confused on calculating date difference in days.
sgeiger at ncee.net
Tue Oct 16 16:17:41 CEST 2007
return (datetime.date.today() -
krishnakant Mane wrote:
> 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.
National Council on Economic Education
sgeiger at ncee.net | 402-438-8958 | http://www.ncee.net
Leading the Campaign for Economic and Financial Literacy
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 310 bytes
Desc: not available
More information about the Python-list