use Carbon\Carbon;
use PhpOffice\PhpSpreadsheet\Shared\Date;
...
public static function transformDateTime(string $value, string $format = 'Y-m-d')
{
try {
return Carbon::instance(Date::excelToDateTimeObject($value))->format($format);
} catch (\ErrorException $e) {
return Carbon::createFromFormat($format, $value);
}
}
laravel execl导入时间变数字
猜你喜欢
转载自blog.csdn.net/qq_38324424/article/details/123837884
今日推荐
周排行