Format date in MySQL to return MonthName, Year

前端 未结 7 946
野性不改
野性不改 2020-12-30 17:26

I have rows in a table that I need to order by date. Easy enough, use the date datatype to store them, ORDER BY date blah blah.

However, I\

7条回答
  •  无人及你
    2020-12-30 18:24

    In SQL you could get

    SELECT year(DBDate), month(DBDate) FROM dates ORDER BY DBDate
    

提交回复
热议问题