> For the complete documentation index, see [llms.txt](https://xlswriter-docs.viest.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xlswriter-docs.viest.me/english/helper/timestamp-from-date.md).

# 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

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

> Returns `0` when `$excelSerial <= 0`.

## Example

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

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