On Tue, 2006-11-14 at 09:33 -0600, Kevin Kelley wrote:
> import time
> FORMAT='%Y%m%d'
> 
> time.strftime(FORMAT,time.gmtime(time.time()+8380800))
> output = '20070219'

While the above works, the following variation using datetime is more
readable:

>>> import datetime
>>> someday = datetime.date.today() + datetime.timedelta(days=97)
>>> print someday.strftime("%Y%m%d")
20070219

-Carsten


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to