I know common question but sort of stuck. I believe I've gotten to the correct format specifier for the to_date function.
I have data that looks like
date |
---|
19-SEP-22 |
I'm trying to convert it to a standard DD/MM/YYYY format
df['date'] = pd.to_datetime(df.date, format='%d-%b-%y')
df['date'] = df['date'].dt.strftime('%d/%m/%Y')
I'm getting error on the first line that the time data does not match the specified format although I believe it should be correct. d for 'dd' b for 'MON' and y for 'yy' am I missing something?