How to change an incorrect datatype for a birth date field from VARCHAR to DATE
ALTER TABLE users ADD COLUMN DOB DATE;

UPDATE users
    SET DOB = STR_TO_DATE(birthdate, '%Y-%m-%d')
    WHERE birthdate REGEXP '[0-9]{4}-[0-9]{2}-[0-9]{2}';

https://dbfiddle.uk/?rdbms=mysql_5.7&amp;fiddle=96c9978ccc667b9289cb3b7b223f28d7