初等日期格式化调试4

master
zcstatham 2 years ago
parent afdcf5b30e
commit de37496279
  1. 2
      extend/service/CarInfoHandle.php

@ -490,7 +490,7 @@ class CarInfoHandle
for ($row = 2; $row <= $highestRow; $row++) { for ($row = 2; $row <= $highestRow; $row++) {
$register_date = $worksheet->getCellByColumnAndRow(2, $row)->getValue(); $register_date = $worksheet->getCellByColumnAndRow(2, $row)->getValue();
if (is_numeric($register_date)) if (is_numeric($register_date))
$register_date = \PhpOffice\PhpSpreadsheet\Shared\Date::excelToDateTimeObject($register_date); $register_date = \PhpOffice\PhpSpreadsheet\Shared\Date::excelToTimestamp($register_date);
$row_array[] = [ $row_array[] = [
'duty_no' => trim(trim($worksheet->getCellByColumnAndRow(1, $row)->getValue(), '"')), 'duty_no' => trim(trim($worksheet->getCellByColumnAndRow(1, $row)->getValue(), '"')),
'register_date' => date('Y-m-d', strtotime(trim(trim($register_date, '"')))), 'register_date' => date('Y-m-d', strtotime(trim(trim($register_date, '"')))),

Loading…
Cancel
Save