导入初登日期格式化

master
zhaocheng 2 years ago
parent 64713799f1
commit 8d944ae308
  1. 2
      extend/service/CarInfoHandle.php

@ -513,7 +513,7 @@ class CarInfoHandle
Db::execute('ALTER TABLE car_info_t DISABLE KEYS;');
for ($row = 2; $row <= $highestRow; $row++) {
$register_date = $worksheet->getCellByColumnAndRow(2, $row)->getValue();
if (is_numeric($register_date))
if (is_numeric($register_date) && $register_date < 99999)
$register_date = date('Y-m-d', \PhpOffice\PhpSpreadsheet\Shared\Date::excelToTimestamp($register_date));
else
$register_date = date('Y-m-d', strtotime(trim(trim($register_date, '"'))));

Loading…
Cancel
Save