Detlef Jockheck wrote:
Hi,
I have a date-string given in format "dd.mm.". Now I would like to
add 100 days. How can this be solved in python?
import datetime
def add100days(datestring):
day, month, year = [int(x) for x in datestring.split('.')]
date0 = datetime.date(year, month, day)
Detlef Jockheck wrote:
> I have a date-string given in format "dd.mm.". 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
Hi,
I have a date-string given in format "dd.mm.". Now I would like to add
100 days. How can this be solved in python?
ciao
Detlef
--
are you ready - attention - go
--
http://mail.python.org/mailman/listinfo/python-list