On 2005-01-05, Nader Emami <[EMAIL PROTECTED]> wrote: > L.S., > > Could somebody help me how I can get the next format of date > from the time module? > > example: I have to have this time 20050105. It is the next > attributes of format %Y%m%d. >
I would use the datetime module: >>> import datetime >>> today = datetime.date.today() >>> today datetime.date(2005, 1, 5) >>> today.strftime('%Y%m%d') '20050105' >>> one_day = datetime.timedelta(1) >>> tomorrow = today + one_day >>> tomorrow.strftime('%Y%m%d') '20050106' -- http://mail.python.org/mailman/listinfo/python-list