I am facing an issue where a date field was maintained as varchar in Mysql. Users have input dates in different formats e.g :
1990/02/22
22/02/1990
22-02-1990
02/22/1990
I need to convert these into one date format dd-mm-yyyy. Is there a clean way to do this? I am using phpmyadmin and when I try:
select STR_TO_DATE(cust_dob, 'dd-mm-yyyy') from my_table;
I am getting 00-00-0000 for all the fields. Anyone knows what I should do?