# fromExcelSerial

Industry: Core

## Signature

```ts
fromExcelSerial(value: number, options?: { system?: ExcelDateSystem; }): string
```

Convert an Excel day serial back to an ISO 8601 instant string.

- The serial is days with the time of day as the fraction, read as a UTC wall clock.
- **Serial 60 in the 1900 system returns ""** — it is the phantom 29 February 1900, a date that never existed. Lotus 1-2-3 treated 1900 as a leap year and Excel keeps the bug for compatibility, so the whole serial day `[60, 61)` is a hole: 59 is 1900-02-28 and 61 is 1900-03-01. Mapping 60 to either neighbour would put every earlier date one day out.
- In the 1904 system serial 60 is a real 1904-03-01.
- Accepted range is Excel's own: serial 1 (1900-01-01) to just under 2958466 (the end of 9999-12-31) in the 1900 system, serial 0 to just under 2957004 in the 1904 system. Serial 0 in the 1900 system is Excel's "January 0, 1900" placeholder, not a date.
- Rounds to the nearest millisecond. A serial is a `double`, whose resolution is about a microsecond near 2024 and about 40 µs near 9999 — finer than a millisecond nowhere in the range, so rounding there is what makes the round trip through `toExcelSerial` exact.
- Returns "" on invalid input.

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `value` | `number` | Excel day serial (number, may carry a fractional time of day) |

## Options

**options**

Which Excel date system the serial is in

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `system?` | `"1900"` \| `"1904"` ([`ExcelDateSystem`](/gmt/reference/types/ExcelDateSystem/)) | `"1900"` | Which Excel date system the serial is counted in. `"1900"` counts serial 1 as 1900-01-01 and has the phantom serial 60; `"1904"` is the legacy Mac system, whose serial 0 is 1904-01-01 and which has no phantom day. The same instant is exactly 1462 lower in the 1904 system. |

## Returns

ISO 8601 instant string (UTC), or "" on invalid input

## Related types

- [`ExcelDateSystem`](/gmt/reference/types/ExcelDateSystem/)

## Examples

```ts
import { fromExcelSerial } from "@northguild/gmt/precision/convert";

fromExcelSerial(1) // "1900-01-01T00:00:00Z" — Excel's first serial
```

## Source

[precision/convert/fromExcelSerial.ts](https://github.com/northguild/gmt/blob/main/packages/gmt/src/precision/convert/fromExcelSerial.ts)
