I am using python Jupiter notebook. I have a data frame called (transac) that contains a column that has a date called (date) in datatype [int64]
when I used pd.datetime
to change the column to datetime[ns] datatype it is changed, but all the dates are on the same date on 1970-01-01
# Change the format of the date from int to date
transac['date']=pd.to_datetime(transac['date'],format='%Y%m%d')
This is the code I used to change the column to DateTime Edit Here is the answer of the question Convert Excel style date with pandas