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
Input | Notes | Example |
---|---|---|
Date/Time data / Required dateTimeInput | A reference to a JavaScript Date object or an ISO timestamp string | 2021-03-05T16:20:42.377Z |
Days string daysInput | Specifies the number of days to use for adjusting the associated Date/Time | 0 |
Hours string hoursInput | Specifies the number of hours to use for adjusting the associated Date/Time | 0 |
Minutes string minutesInput | Specifies the number of minutes to use for adjusting the associated Date/Time | 0 |
Seconds string secondsInput | Specifies the number of seconds to use for adjusting the associated Date/Time | 0 |
Example Payload for Adjust Date/Time
{
"data": "2021-03-06T19:25:37.131Z"
}
Convert Date To Epoch
Convert the given Date to a seconds/milliseconds Epoch. | key: convertToEpoch
Input | Default | Notes | Example |
---|---|---|---|
Date/Time data / Required dateTimeInput | A reference to a JavaScript Date object or an ISO timestamp string | 2021-03-05T16:20:42.377Z | |
Display Epoch In Seconds boolean displayEpochInSeconds | false | If true, action will format the given date to Epoch time in seconds instead of milliseconds. |
Example Payload for Convert Date To Epoch
{
"data": 1733171442833
}
Convert Date/Time To ISO String
Convert the given Date/Time to an ISO string | key: convertToISOString
Input | Notes | Example |
---|---|---|
Date/Time data / Required dateTimeInput | A reference to a JavaScript Date object or an ISO timestamp string | 2021-03-05T16:20:42.377Z |
Time Zone string timeZoneInput | Specifies the timezone to use for converting to a localized ISO timestamp string | America/Chicago |
Example Payload for Convert Date/Time To ISO String
{
"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
Input | Notes | Example |
---|---|---|
Date/Time data / Required dateTimeInput | A reference to a JavaScript Date object or an ISO timestamp string | 2021-03-05T16:20:42.377Z |
Time Zone string timeZoneInput | Specifies the timezone to use for converting to a localized ISO timestamp string | America/Chicago |
Example Payload for Convert Date/Time To Local ISO String
{
"data": "2021-03-06T13:25:37.131-06:00"
}
Convert Epoch Timestamp To Date
Convert the given Epoch timestamp to a ISO String Date. | key: convertFromEpoch
Input | Default | Notes | Example |
---|---|---|---|
Epoch Timestamp in Seconds boolean isSecondsTimestamp | false | If true, action will assume the given timestamp is in seconds instead of milliseconds. | |
Epoch Timestamp string / Required timestamp | The epoch timestamp you would like to convert to a date. | 1712686206 |
Example Payload for Convert Epoch Timestamp To Date
{
"data": "2021-03-06T19:25:37.131Z"
}
Format Date/Time
Change the format of a timestamp given a format string | key: formatDateTime
Input | Default | Notes | Example |
---|---|---|---|
Date/Time data / Required dateTime | A reference to a JavaScript Date object or an ISO timestamp string | 2021-03-05T16:20:42.377Z | |
Format string / Required format | YYYY-MM-DDTHH:mm:ss.SSSZ | 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. | |
Time Zone string / Required timeZone | etc/UTC | Specifies the timezone to use for converting to a localized ISO timestamp string | America/Chicago |
Get Current Date/Time
Return the current Date/Time in UTC | key: getCurrentDateTime
Input | Default | Notes |
---|---|---|
Display Epoch In Seconds boolean displayEpochInSeconds | false | If true, the current Date/Time will be displayed in seconds. |
Example Payload for Get Current Date/Time
{
"data": "2021-03-06T19:25:37.131Z"
}