convert date variable into date format in dataframe python code example
Example 1: from string to time python dataframe
dfc['Time_of_Sail'] = pd.to_datetime(dfc['Time_of_Sail'],format= '%H:%M:%S' ).dt.time
Example 2: apply format to pandas datetime column
formatted_df = df["Date"].dt.strftime("%m/%d/%y")