I am trying to convert my time data from MM/DD/YYYY to M/D/YYYY in Python. I tried the line below but it does not work.
time_data_in_M_D_YYYY = datetime.strptime(time_data_in_MM_DD_YYYY, "%m-%d-%Y").strftime("%-m/%-d/%Y")
ValueError: Invalid format string