Skip to main content
Workday User Guide
Last Updated: 2023-06-23
EPOCH_MS_TO_DATE

EPOCH_MS_TO_DATE

Description

EPOCH_MS_TO_DATE
is a row function that converts
LONG
values to
DATE
values, where the input number represents the number of milliseconds since the epoch.

Syntax

EPOCH_MS_TO_DATE
(
long_expression
)

Return Value

Returns one value per row of type
DATE
in UTC format
yyyy-MM-dd HH:mm:ss:SSS Z
.

Input Parameters

long_expression
Required. A field or expression of type
LONG
representing the number of milliseconds since the epoch date (January 1, 1970 00:00:00:000 GMT).

Examples

Convert a number representing the number of milliseconds from the epoch to a human-readable date and time:
EPOCH_MS_TO_DATE(1360260240000) returns
2013-02-07T18:04:00:000Z
or February 7, 2013 18:04:00:000 GMT
Or if your data is in seconds instead of milliseconds:
EPOCH_MS_TO_DATE(1360260240 * 1000) returns
2013-02-07T18:04:00:000Z
or February 7, 2013 18:04:00:000 GMT