The correct syntax is:
datetime.strptime('2012-11-14 14:32:30', '%Y-%m-%d %H:%M:%S')
so first a line, then a format.
Read aloud:
ValueError: time data '%Y-%m-%d %H:%M:%S' does not match format '2012-11-14 14:32:30' ValueError: time data '2012-11-14 14:32:30' does not match format '%Y-%m-%d %H:%M:%S'
eumiro
source share