Home > OS >  Get tommorow's date as a datetime.date object on python [duplicate]
Get tommorow's date as a datetime.date object on python [duplicate]

Time:09-29

I want to get tommorow's date as datetime.date object just like "datetime.date.today()". I Need to use strftime() on it so timedelta is not an option.

Thanks in advance!

CodePudding user response:

Try this:

>>> import datetime
>>> datetime.date.today()   datetime.timedelta(days=1)

CodePudding user response:

Try this:

import time
import datetime
cur_tim=time.localtime(time.time()   24*3600)
datetime.date(cur_tim[0],cur_tim[1],cur_tim[2])
  • Related