Convert

Convert Excel serial numbers to dates and back

POST/v1/convert/excel_serial/{direction}

View as Markdown

to_date converts Excel serial numbers such as 45212.5 to ISO 8601 dates, to_serial turns ISO dates into serial numbers. Works on up to 1000 values at once, in the 1900 or the 1904 date system, and handles the Excel 1900 leap year bug. A value that cannot be converted is reported on its own row and never stops the others.

Parameters

Name Type Required Description
direction one of: to_date, to_serial yes

Request body

Name Type Required Description
values array of string yes Serial numbers such as 45212.5, or ISO 8601 dates such as 2023-10-13 or 2023-10-13T12:00:00
date_system one of: 1900, 1904 no 1900 is the default of Excel for Windows and current Mac Excel, 1904 is for old Mac workbooks (default "1900")

Example request

A request body that works, as JSON.

{
  "values": [
    "45212.5",
    "45318"
  ]
}

Response

The fields inside data of a successful response.

Name Type Required Description
results array of ExcelSerialResult yes One result per input value, in order
count integer yes Number of values received
failed_count integer yes Number of values that could not be converted

Example response

A real answer from the operation, as JSON. The fields in the table above are inside data.

{
  "data": {
    "results": [
      {
        "original": "45212.5",
        "converted": "2023-10-13T12:00:00",
        "error": null
      },
      {
        "original": "45318",
        "converted": "2024-01-27",
        "error": null
      }
    ],
    "count": 2,
    "failed_count": 0
  },
  "errors": null,
  "meta": {
    "request_id": "b4eb7cbb-77ff-44d7-9e29-c0e2d542229e",
    "timestamp": "2026-10-27T07:19:42.008505Z",
    "version": "2026-03-26"
  },
  "pagination": null
}

Responses

Status When it happens
200 Successful Response
400 The body respects the operation schema, but the use case rejected it. Each problem is one ApiError entry
413 The request is larger than the request size limit of the API allows
422 The body does not respect the operation schema. Each problem is one ApiError entry with the code validation_error
500 Something failed inside the server and was not an input problem. The same envelope, errors may be empty