For the complete documentation index, see llms.txt. This page is also available as Markdown.

Excel serial date to timestamp

Excel stores dates as a floating-point serial (days since 1900-01-01 or 1904-01-01). When the reader returns a date cell as a double, use timestampFromDateDouble() to convert it into a Unix timestamp.

Function Prototype

static Excel::timestampFromDateDouble(float $excelSerial): int

Returns 0 when $excelSerial <= 0.

Example

$timestamp = \Vtiful\Kernel\Excel::timestampFromDateDouble(44197.0);

echo date('Y-m-d', $timestamp); // 2021-01-01

Last updated