Very new to python, please excuse the noob question:
I have a number that represents a date like :
date = 20121228
( representing December 28th, 2012)
How can I increment that date by 5 days in python so I end up with a new (correct) number representing the date like
date = 20130102
I don’t want:
date = 20121233
Update: When I try and use datetime.strptime I get this error:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
AttributeError: type object 'datetime.datetime' has no attribute 'strptime'
Try this: