PHP 导入excel 时间报错解决
例如:
PHP 导入excel 时间报错解决
$time = '2023-08-23 15:35:10';//表格时间样式
$d = 25569;
$t = 24 * 60 * 60;
$checkdate = intval(($time - $d) * $t);
$checktime = gmdate("Y-m-d H:i:s", $checkdate );
//单元格文本格式
$worksheet->getCell('C'.$hang)->setValueExplicit($riqis1,\PhpOffice\PhpSpreadsheet\Cell\DataType::TYPE_STRING);