Change MYSQL date format

后端 未结 4 1942
我寻月下人不归
我寻月下人不归 2021-01-28 10:10

I have a table in MYSQL of which 3 columns have dates and they are formatted in the not desired way.

Currently I have: mm/dd/yyyy and I want to change t

4条回答
  •  囚心锁ツ
    2021-01-28 10:25

    UPDATE Vehicles SET yourdatecolumn=DATE_FORMAT(STR_TO_DATE(yourdatecolumn, '%c-%d-%Y'), '%d-%c-%Y')

提交回复
热议问题