• /
  • EnglishEspañolFrançais日本語한국어Português
  • Inicia sesiónComenzar ahora

Utilities - DateTime

This page provides a comprehensive reference for utilities - datetime available in the workflow automation actions catalog. These actions enable you to date and time utilities.

Convert an epoch to date/time

This action is used to transform from epoch timestamp to date/time. Possible references:

Refer fromEpoch for more information.

Input

Optionality

Type

Description

timestamp

Required

Int

An integer representing epoch timestamp. Note: UNIX epochs are the number of seconds after 1st Jan 1970, midnight UTC (00:00)

timestampUnit

Optional

string

A string representing unit of provided timestamp. Acceptable values: SECONDS, MILLISECONDS(DEFAULT)

timezoneId

Optional

String

A string representing timezone for desired date/time, default: UTC

For more information on supported zoneIds refer: ZoneId (Java Platform SE 8 )

pattern

Optional

String

A string representing pattern for desired datetime,

default: ISO-8601

For more information on supported patterns refer: DateTimeFormatter (Java Platform SE 8 )

selectors

Optional

List

The selectors to get the only specified parameters as output.

Field

Optionality

Datatype

Description

date

Required

String

A string representation of date.

time

Required

String

A string representation of time.

datetime

Required

String

A string representation of datetime.

timezone

Required

Map

A map representation of timezoneId and abbreviation.

success

Boolean

Status of the request

errorMessage

String

Failure reason as message

Example

Workflow Input

Outputs

name: from_epoch
workflowInputs:
timestamp:
type: Int
timestampUnit:
type: String
timezoneId:
type: String
pattern:
type: String
steps:
- name: epochTime
type: action
action: utils.datetime.fromEpoch
version: 1
inputs:
timestamp: ${{ .workflowInputs.timestamp }}
timezoneId: ${{ .workflowInputs.timezoneId }}
pattern: ${{ .workflowInputs.pattern }}
timestampUnit: ${{ .workflowInputs.timestampUnit }}
selectors:
- name: date
expression: ".date"
- name: time
expression: ".time"
- name: datetime
expression: ".datetime"
- name: timezone
expression: ".timezone"
mutation {
autoflowsStartWorkflowRun(
accountId: 11933347
definition: { name: "from_epoch" }
workflowInputs: [
{key: "timestamp", value: "1738236424003"}
{key: "timestampUnit", value: "MILLISECONDS"}
{key: "pattern", value: "yyyy-mm-dd HH:SS"}
{key: "timezoneId", value: "Asia/Kolkata"}
]
) {
runId
}
}
{
"success": true
"date": "2025-01-30",
"time": "16:57:04.003"
"datetime": "2025-57-30 16:00",
"timezone": {
"abbreviation": "IST",
"id": "Asia/Kolkata"
}
}
Copyright © 2026 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.