Skip to main content

Date/Time Component

Get and adjust Date/Time values

Component key: datetime

Description#

The Date/Time component is a collection of actions for working with Date/Time values. You can fetch the current time, convert timestamps between time zones, and more.

Actions#

Adjust Date/Time#

Add/Remove the specified seconds, minutes, hours, and days from the specified Date/Time | key: adjustDateTime

InputKeyNotesExample

Date/Time

data
/ Required
dateTimeInputA reference to a JavaScript Date object or an ISO timestamp string2021-03-05T16:20:42.377Z

Days

string
daysInputSpecifies the number of days to use for adjusting the associated Date/Time0

Hours

string
hoursInputSpecifies the number of hours to use for adjusting the associated Date/Time0

Minutes

string
minutesInputSpecifies the number of minutes to use for adjusting the associated Date/Time0

Seconds

string
secondsInputSpecifies the number of seconds to use for adjusting the associated Date/Time0

Output Example Payload#

{  "data": "2021-03-06T19:25:37.131Z"}

Convert Date/Time To ISO String#

Convert the given Date/Time to an ISO string | key: convertToISOString

InputKeyNotesExample

Date/Time

data
/ Required
dateTimeInputA reference to a JavaScript Date object or an ISO timestamp string2021-03-05T16:20:42.377Z

Time Zone

string
timeZoneInputSpecifies the timezone to use for converting to a localized ISO timestamp stringAmerica/Chicago

Output Example Payload#

{  "data": "2021-03-06T19:25:37.131Z"}

Convert Date/Time To Local ISO String#

Convert the given Date/Time to an ISO string in local time using specified timezone | key: convertToLocalISOString

InputKeyNotesExample

Date/Time

data
/ Required
dateTimeInputA reference to a JavaScript Date object or an ISO timestamp string2021-03-05T16:20:42.377Z

Time Zone

string
timeZoneInputSpecifies the timezone to use for converting to a localized ISO timestamp stringAmerica/Chicago

Output Example Payload#

{  "data": "2021-03-06T13:25:37.131-06:00"}

Get Current Date/Time#

Return the current Date/Time in UTC | key: getCurrentDateTime

Output Example Payload#

{  "data": "2021-03-06T19:25:37.131Z"}