Trying to parse a date to a string and getting this error. Not able to figure out which variable is incorrect.
ValueError: time data '12:00 AM IST on June 01, 2017' does not match format '%I:%M %p %Z on %B %d, %Y'
Here is the code
data = sorted(data['data'], key=lambda x: datetime.datetime.strptime(x['date']['pretty'], '%I:%M %p %Z on %B %d, %Y'), reverse=False)