confused on calculating date difference in days.

krishnakant Mane researchbase at gmail.com
Tue Oct 16 03:03:33 EDT 2007


hello,
I am strangely confused with a date calculation problem.
the point is that I want to calculate difference in two dates in days.
there are two aspects to this problem.
firstly, I can't get a way to convert a string like "1/2/2005" in a
genuan date object which is needed for calculation.
now once this is done I will create a another date object with
today = datetime.datetime.now()
and then see the difference between this today and the string that I
converted to date.
now in the first place I can't recall how I can convert a string to a date.
then now I don't know how to calculate difference in days between
today and the string converted date.
any help will be appreciated.
regards,
Krishnakant.



More information about the Python-list mailing list