SQL ORDER BY date problem

后端 未结 10 1460
情歌与酒
情歌与酒 2020-11-30 05:14

Can you please help me in solving this problem. I am trying to order the results of an SQL query by date, but I\'m not getting the results I need.

The query I\'m usi

10条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-30 05:54

    Try using this this work for me

    select *  from `table_name` ORDER BY STR_TO_DATE(start_date,"%d-%m-%Y") ASC
    

    where start_date is the field name

提交回复
热议问题