best way to change the date format in mysql SELECT?

前端 未结 4 1204
不知归路
不知归路 2021-01-02 15:47

Can any one please let me know, i need to change the data format 2010-05-14 17:53 to 14/05/2010 17:53 using mysql select query

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-02 16:31

    Use DATE_FORMAT to format your DATE. To solve your conversion, use the following code as a pointer

    SELECT DATE_FORMAT('2010-05-14 17:53', '%d/%m/%Y %H:%i');
    

提交回复
热议问题