easy problem but this is bugging me:
Say I have a string like this:
test = '2015-08-12 13:07:32'
To convert it into a datetime object and change it to AM/PM specification, shouldn't this work?
datetime.datetime.strptime(test, '%Y-%m-%d %I:%M:%S %p')
I'm getting an error like this:
ValueError: time data '2015-08-12 13:07:32' does not match format '%Y-%m-%d %I:%M:%S %p'
Also, for bonus points:
If I already have something in datetime format, how do I change it from that state? (if I wanted to keep it as a datetime object but just reformat it to make it AM/PM)