Shape · Dates and time

Convert Serial Date

Converts between numbers and dates: Unix timestamps, Excel serial dates, Julian days or your own starting point. For example, 45292 from Excel becomes 2024-01-01.

Also known as: Epoch, Excel date

How it works

Each conversion row names a column, a format (Unix epoch, Excel / OLE, Julian or Custom epoch) and a direction, To number or To datetime. Unix takes a unit (seconds by default, or milli-, micro- or nanoseconds); Excel takes the 1900 or 1904 system; Julian takes Julian Day (JDN) or Modified (MJD); Custom epoch takes an anchor date and a unit, with presets such as NTP, Apple / Cocoa, Windows FILETIME and .NET ticks. To datetime can produce a Timestamp (default) or a Date. The result is appended as a new column, named column_format for To number and column_datetime for To datetime unless you set an output. In the Excel 1900 system the serials 0 and 60 are not real dates and decode to NULL, with a warning that counts them.

Inputs and outputs

Inputs

  • data — Table

Outputs

  • data — Table

Settings

The Attributes panel of Convert Serial Date, as in the app: the controls work, but nothing runs — there is no data behind it.

The same settings, as the Assistant writes them
conversions: [{column, format:"unix"|"excel"|"julian"|"custom", direction:"to_serial"|"from_serial", unixUnit?, excelSystem?, julianKind?, customAnchor?, customUnit?, decodeType?, outputColumn?}]

Example

A spreadsheet export stores shipped as an Excel serial. Add a conversion: column shipped, Excel / OLE, 1900 system, To datetime, output type Date.

shippedshipped_datetime
452922024-01-01
453232024-02-01