与使用“maatwebsite / excel”导出laravel 5.3中的表的时间不同:“2.1”

当我从我的表中导出数据到excel文件时,在date部分我得到的date加上以下格式的时间:

2016-09-02 00:00:00 

但我想date部分显示date只是这样的例如:

 2016-09-02 

没有时间

这是我的代码,将表格数据导出到Excel工作表。

 public function export_records(){ $date = Carbon::today()->toDateString(); $nc24_export = nc24form_model::where('created_at', '>=', Carbon::now()->subDays(7))->get(); Excel::create('Weekly Report' . $date , function($excel) use($nc24_export){ $excel->sheet('sheet 1', function($sheet) use($nc24_export){ $sheet->fromArray($nc24_export); }); })->export('xlsx'); } 

 $sheet->setColumnFormat(['A'=>'@']); 

尝试一下