值是几天过去了自1900年以来,您可以使用内置的功能PhpSpreadsheet将其转换为Unix时间戳量:

$value = $worksheet->getCell('A1')->getValue(); 
$date = \PhpOffice\PhpSpreadsheet\Shared\Date::excelToTimestamp($value); 

或一个PHP DateTime对象:

$value = $worksheet->getCell('A1')->getValue(); 
$date = \PhpOffice\PhpSpreadsheet\Shared\Date::excelToDateTimeObject($value); 

相关文章:

  • 2022-12-23
  • 2021-11-02
  • 2021-12-14
  • 2022-12-23
  • 2021-10-30
  • 2022-12-23
  • 2022-12-23
  • 2021-07-07
猜你喜欢
  • 2022-12-23
  • 2021-12-02
  • 2022-12-23
  • 2021-07-20
  • 2021-10-21
  • 2021-05-25
  • 2022-12-23
相关资源
相似解决方案