📜  格式化时间 laravel - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:07.901000             🧑  作者: Mango

代码示例6
//before
$data->created_at; // 2021-12-14 00:00:00

//after
$data->created_at->format('Y-m-d'); //2021-12-14
$data->created_at->format('H:i:s'); //00:00:00