Format date in MySQL to return MonthName, Year

前端 未结 7 891
野性不改
野性不改 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:27

    Once you get date in mysql, use this in php

    $date = mysql_result(mysql_query("SELECT date FROM table"),0,0);
    echo date("F, Y", strtotime($date));
    
    0 讨论(0)
提交回复
热议问题