Apologies, I have seen a few of these questions regarding Error 1411 and I have gone through and read solutions but none seem to work for me here.
Using MYSQL, I have a table where the column transaction_date is a text type. The dates are listed as 1/1/2023. However, when I attempt to run the following query:
UPDATE coffee_shop_sales
SET transaction_date = str_to_date(transaction_date, "%d-%m-%Y");
It gives me the message:
Error Code: 1411. Incorrect datetime value: ‘1/1/2023’ for function str_to_date.
Even when I switch the d and the m in that update statement, it changes nothing, same message. How can I update this column from a text type to a date column? Where am I going wrong?
I have attached the video of where I am getting this data from, the timestamp specifically is 47:40 when he runs this. I noticed he also had the error code 1411 but for whatever reason his data does work? Not sure.
Thank you in advance!!
6