Hi - could somebody help me with this please, I'm new to workbench and Ive just uploaded a table into workbench from an excel csv file. In the excel table
one of the columns had a date value, I loaded this into my table using workbench as a text file as I was having problems importing this file using the wizard because it was having problems with importing the date, so in my new table in workbench this date field (text) is displayed as dd/mm/YYYY (eg 01/01/1999)
So in the example below if;
table - mytable
date field - fldmydate
In mytable if my date field is mydate in the format eg 06/08/2021 which has been stored as text in mytable in workbench
I want to change this text field to a date field in the format 'dd/mm/YYYY' and I use the
UPDATE mytable SET fldmydate = STR_TO_DATE(fldmydate,'%d-%m-%Y');
15:53:25 UPDATE mytable SET fldmydate = STR_TO_DATE( fldmydate'%d-%m-%Y') Error Code: 1411. Incorrect datetime value: '06/08/2021' for function str_to_date 0.016 sec
Could somebody please help with what I'm doing wrong - I cant see an error
one of the columns had a date value, I loaded this into my table using workbench as a text file as I was having problems importing this file using the wizard because it was having problems with importing the date, so in my new table in workbench this date field (text) is displayed as dd/mm/YYYY (eg 01/01/1999)
So in the example below if;
table - mytable
date field - fldmydate
In mytable if my date field is mydate in the format eg 06/08/2021 which has been stored as text in mytable in workbench
I want to change this text field to a date field in the format 'dd/mm/YYYY' and I use the
UPDATE mytable SET fldmydate = STR_TO_DATE(fldmydate,'%d-%m-%Y');
15:53:25 UPDATE mytable SET fldmydate = STR_TO_DATE( fldmydate'%d-%m-%Y') Error Code: 1411. Incorrect datetime value: '06/08/2021' for function str_to_date 0.016 sec
Could somebody please help with what I'm doing wrong - I cant see an error