I had a large dataset with all the date fields in the format DD/MM/YYYY. I needed to convert them to YYYY-MM-DD . I ran the following queries:
UPDATE TABLE_NAME SET FIELD_NAME = replace(FIELD_NAME, '/', '-');
UPDATE TABLE_NAME SET FIELD_NAME = str_to_date(FIELD_NAME,'%d-%m-%Y');
Hope it helps…
Hey thank you very much for this post; It was exactly what I needed.