I have one column date1 which is varchar type
I want this column to date type.
I tried changing field but all date is converted to 0000-00-00.
format is dd-mm-yyyy but in varchar.
How can I convert the same date format but with date format using sql queries or similar but at database level ?
More about STR_TO_DATE function.
Since your column name is
date1, you can replacecolumnwithdate1in the above syntax, and the code shall be: