Welcome

首页 / 网页编程 / PHP / PhpSpreadsheet 读取时间变数字解决方法

表中数据格式:2019-5-9 PM2:33:51

$cellVal= trim($objPHPExcel->getActiveSheet()->getCell("J" . $j)->getValue());

$toTimestamp = \PhpOffice\PhpSpreadsheet\Shared\Date::excelToTimestamp($cellVal);

$date = date("Y-m-d", $toTimestamp );