python add one day to a date

description: python add one day to a date

python datetime date add one day

1
2
3
4
5
6
import datetime
d = datetime.datetime.strptime('2018-02-01', '%Y-%m-%d')
# d
# datetime.datetime(2018, 2, 1, 0, 0)
d + datetime.timedelta(days=1)
# datetime.datetime(2018, 2, 2, 0, 0)

more on search4fan.github.io