I am converting the following string 2020-02-14 20:56:00 to datetime.date format. But am getting the following error:
ValueError: time data '2020-02-14 20:56:00' does not match format '%Y/%m/%d %H:%M:%S'
Here is the code I am using:
from datetime import datetime
date_and_time = '2020-02-14 20:56:00'
date_and_time = datetime.strptime(date_and_time, '%Y/%m/%d %H:%M:%S')
What am I doing wrong here?