Skip to content

Epoch To DateTime#

The Epoch To DateTime converter receives an epoch timestamp, as a String or a Number expressed in milliseconds since the Unix epoch (1970-01-01T00:00:00Z), and transforms it into a DateTime value. If the input is a string, it is first converted to a number; an invalid or non-numeric value causes the converter to fail.

Settings#

This converter has no settings.

Epoch To DateTime Converter Settings

Examples#

Number input#

The converter treats numeric inputs as milliseconds since the Unix epoch.

Input Output (DateTime)
1000000000000 2001-09-09T01:46:40.000Z
0 1970-01-01T00:00:00.000Z

Table 1: Number Input Examples

String input#

The converter converts string inputs to a number first.

Input Output (DateTime)
1000000000000 2001-09-09T01:46:40.000Z

Table 2: String Input Examples

Invalid Input#

This converter fails in the case below. For what happens to the rest of the chain when a converter fails (the error is logged, reported for monitoring, and the next task does not run), see Converters.

Input Result
not-a-number Fails with Invalid epoch value: not-a-number.

Table 3: Invalid Input