I am having a problem with parsing time string to datetime. A snip of my code is as follows:
datetime.datetime.strptime('16/Sep/2017:00:00:00 +0000', '%d/%b/%Y:%M:%H:%S %z')
I am getting the following error:
ValueError: 'z' is a bad directive in format '%d/%b/%Y:%M:%H:%S %z'
I am on Python 2.7.10.
Please come up with simple solution, instead complicated code as I am running this to on a log file having millions of rows. Thanks.
Solution to this particular problem is not found.