calculate with date
Fredrik Lundh
fredrik at pythonware.com
Tue Feb 15 03:07:40 EST 2005
Detlef Jockheck wrote:
> I have a date-string given in format "dd.mm.yyyy". Now I would like to add 100 days. How can this
> be solved in python?
>>> from datetime import date, timedelta
>>> d = date(2005, 2, 15)
>>> d
datetime.date(2005, 2, 15)
>>> d + timedelta(days=100)
datetime.date(2005, 5, 26)
more here:
http://docs.python.org/lib/module-datetime.html
</F>
More information about the Python-list
mailing list