I have a column with the following format:
Original format:
mm/dd/YYYY |
---|
10/28/2021 |
10/28/2021 |
the output after:
print(df['mm/dd/YYYY'])
0 2021-10-28 00:00:00
1 2021-10-28 00:00:00
However when I am trying to convert to datetime I get the following error:
pd.to_datetime(df['mm/dd/YYYY'], format='%Y-%m-%d %H:%M:%S')
time data mm/dd/YYYY doesn't match format specified