I'm trying to add or minus time from a datetime object and then convert it to strptime but I'm getting an error message.
Here's an example of getting the 'hour' of a datetime object, adding + 1 to it and then trying to use strptime on it;
time1 = datetime.datetime.strptime("09/Sep/2015:08:00:00", "%d/%b/%Y:%H:%M:%S")
print time1.hour
print time1.hour + 1
> 8
9
time3 = time1.hour + 1
print time3.strptime('%H')
> print time3.strptime('%H')
AttributeError: 'int' object has no attribute 'strptime'
Is there any way to manipulate datetime objects and change its format (with strptime or similar)?