I have an atypical time format that I need to convert into a datetime index for time series analysis. I'm working in Python / Pandas.
The column is 'BC_DT', and the format is "27-MAR-18". Example is below.
BC_DT 27-MAR-18 28-MAR-18 29-MAR-18
I tried this method, but I'm getting an error: ValueError: time data '27-MAR-18' does not match format '%d-%b-%Y'
df['Converted_Date'] = df['BC_DT'].apply(lambda x: dt.datetime.strptime(x, '%d-%b-%Y'))