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

InputNotesExample
Input
Date/Time
data
/ Required
Notes
A reference to a JavaScript Date object or an ISO timestamp string
Example
2021-03-05T16:20:42.377Z
Input
Days
string
Notes
Specifies the number of days to use for adjusting the associated Date/Time
Example
0
Input
Hours
string
Notes
Specifies the number of hours to use for adjusting the associated Date/Time
Example
0
Input
Minutes
string
Notes
Specifies the number of minutes to use for adjusting the associated Date/Time
Example
0
Input
Seconds
string
Notes
Specifies the number of seconds to use for adjusting the associated Date/Time
Example
0

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

InputNotesExample
Input
Date/Time
data
/ Required
Notes
A reference to a JavaScript Date object or an ISO timestamp string
Example
2021-03-05T16:20:42.377Z
Input
Time Zone
string
Notes
Specifies the timezone to use for converting to a localized ISO timestamp string
Example
America/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

InputNotesExample
Input
Date/Time
data
/ Required
Notes
A reference to a JavaScript Date object or an ISO timestamp string
Example
2021-03-05T16:20:42.377Z
Input
Time Zone
string
Notes
Specifies the timezone to use for converting to a localized ISO timestamp string
Example
America/Chicago

Output Example Payload#

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

Format Date/Time#

Change the format of a timestamp given a format string | key: formatDateTime

InputDefaultNotesExample
Input
Date/Time
data
/ Required
Default
 
Notes
A reference to a JavaScript Date object or an ISO timestamp string
Example
2021-03-05T16:20:42.377Z
Input
Format
string
/ Required
Default
YYYY-MM-DDTHH:mm:ss.SSSZ
Notes
The format of timestamp you would like. Use YYYY for year, MM for month, DD for day, HH for 24 hour, hh for 12 hour clock, mm for minute, ss for second, SSS for milliseconds and Z for timezone offset.
Example
 
Input
Time Zone
string
/ Required
Default
etc/UTC
Notes
Specifies the timezone to use for converting to a localized ISO timestamp string
Example
America/Chicago

Get Current Date/Time#

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

Output Example Payload#

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