【thinkphp】框架中使用時間戳轉換爲時間格式

$reports = \think\Db::name('general_report')
                ->field('company_id,company_name,FROM_UNIXTIME(create_time,"%Y-%m-%d %h:%i") as date')
                ->where(array('company_name'=>$company_name))
                ->select();

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章