I'd like to convert a column to date. My source data is from an Excel which is already formatted to date data type. However, when pandas read my file the date columns are read as e.g.'44249'
I tried the following code
RPT["Pot"] =`RPT["Pot"].apply(lambda x: pd.to_datetime(x, format='%d%m%Y'))
but I got the error time data '44249' does not match format '%d%m%Y' (match).
I also tried this code:
RPT["PLANNED SUBMISSION DATE TO E&P"] = pd.to_datetime(RPT["PLANNED SUBMISSION DATE TO E&P"])
but the results were 1970-01-01 00:00:00.000044365
, which inaccurate.
Can I anyone please help me?