I have an error when I try to convert to datetime from Excel to MySQL using python.
I have an excel file in which I have a column called CompletedDate and I have the same column in the MySQL Database, this column in MySQL is a DateTime column.
When I import the value from Excel I do it the next.
CompletedDate = pd.to_datetime(sheet.cell(r, 23).value, format='%Y-%m-%d %H:%M')
But, when I see my database, I see dates like 1970-01-01 00:00 and not my date on the excel file.
In the Excel CompletedDate column, the date is like this:
04/07/2021 14:20
And I need to convert to Y-m-d h:m on the MySQL database.
Any idea to solve it?