I was loading DB2 table into mysql and I was facing issue while loading data with Date format.
I converted those columns into VARCHAR(26) format and loaded the data successfully.
Now I want to convert 2003-01-13-16.50.32.000000 into Date format.
I introduced another column with Date datatype and tried to update it using origional (String) column.
update po_datamart
set POH_APPROVED_DATE_TEMP=DATE_FORMAT(str_to_date(POH_APPROVED_DATE,'%Y-%c-%d-%H.%i.%s'), '%Y-%c-%d%H:%m:%s');
I am getting following error "Error Code: 1292. Truncated incorrect datetime value: '2003-01-13-16.50.32.000000'".
Would appreciate if anyone can help me with this VARCHAR to DATE conversion.