pd.to_datetime python

import pandas as pd
date='2020/11/26 12:00:00'
date_time=pd.to_datetime(date, format='%Y/%m/%d %H:%M:%S')

Here is what the above code is Doing:
1. We’re creating a variable called date_time and setting it equal to the output of the pd.to_datetime() function.
2. We’re passing the date variable into the pd.to_datetime() function.
3. We’re specifying the format of the date variable using the format parameter.
4. We’re using the %Y/%m/%d %H:%M:%S format, which tells pandas to expect dates in the format of Year/Month/Day Hour:Minute:Second.