See the supported connectors for Application Integration.

EPOCH_TO_HUMAN_READABLE_TIME function

EPOCH_TO_HUMAN_READABLE_TIME function

Function Name Description Usage Input parameter Return value
EPOCH_TO_HUMAN_READABLE_TIME Converts Unix epoch time (in milliseconds) to human-readable time format. EPOCH_TO_HUMAN_READABLE_TIME (value, value) This function takes the following arguments:
  • First argument (string): Timestamp format pattern such as hh:mm:ss.
  • Second argument (string): Target timezone.

    Valid values include UTC, UTC with offset, GMT, and other time zone names.

    Only the values UTC and GMT can be specified in the short form. For any other time zone, you must specify the full time zone name. For example, if you want to specify the "Australia/Melbourne" time zone, you must specify Australia/Melbourne as the value and not AEDT. For a full list of timezone names, see List of tz database time zones.

Converted timestamp in human-readable format.

Supported data type

The EPOCH_TO_HUMAN_READABLE_TIME function supports the following data type:

  • Integer

Example: Convert an Unix epoch time (in milliseconds) to human-readable format.

Sample data: $var1$ = 1667494335011

Usage 1: $var1$.EPOCH_TO_HUMAN_READABLE_TIME("EEE, d MMM yyyy HH:mm:ss z","UTC")

Convert var1 to a human-readable timestamp of format EEE, d MMM yyyy HH:mm:ss z in UTC timezone.

Output: Thu, 3 Nov 2022 16:52:15 UTC

Usage 2: $var1$.EPOCH_TO_HUMAN_READABLE_TIME("EEE, yy-MM-dd HH:mm:ss,SSS","GMT")

Convert var1 to a human-readable timestamp of format EEE, yy-MM-dd HH:mm:ss,SSS in GMT timezone.

Output: Thu, 22-11-03 16:52:15,011

Usage 3: $var1$.EPOCH_TO_HUMAN_READABLE_TIME("EEE, yy-MM-dd HH:mm:ss,SSS ZZZZ","America/Los_Angeles")

Convert var1 to a human-readable timestamp of format EEE, yy-MM-dd HH:mm:ss,SSS ZZZZ in America/Los_Angeles timezone.

Output: Thu, 22-11-03 09:52:15,011 GMT-07:00

Recommendation