I have a table in the database which stored the date as a String. I created a new column and made it a date. Now I need to move the dates from the old table into the new, but I get this error:
Warning: #1411 Incorrect datetime value: '2020-05-11 19:31' for function str_to_date
Here is the code I used.
update TABLE_NAME set dateAddedNew = date(str_to_date(dateAdded, '%m/%d/%Y'))
Here is the structure.
How can I convert the dateAdded into the dateAddedNew without keeping the time?