I am working on a table in which there are two date formats stored in the field, some of which are in mm / dd / yy, and new entries are in the format yyyy / mm / dd, as it should be.
I want to run such a request
UPDATE table
SET date_field = DATE_FORMAT(date_field, '%Y/%m/%d')
WHERE date_field = DATE_FORMAT(date_field, '%m/%d/%y')
But it just doesnβt work. One of the results I got was that it just took% m data and turned it into% Y and really messed up the data.
Any thoughts?
source
share