Date/Time Component

Get and adjust Date/Time values
Component key: datetime#
DescriptionThe 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/TimeAdd/Remove the specified seconds, minutes, hours, and days from the specified Date/Time | key: adjustDateTime
Input | Notes | Example |
---|---|---|
Input Date/Time data / Required dateTimeInput | Notes A reference to a JavaScript Date object or an ISO timestamp string | Example 2021-03-05T16:20:42.377Z |
Input Days string daysInput | Notes Specifies the number of days to use for adjusting the associated Date/Time | Example 0 |
Input Hours string hoursInput | Notes Specifies the number of hours to use for adjusting the associated Date/Time | Example 0 |
Input Minutes string minutesInput | Notes Specifies the number of minutes to use for adjusting the associated Date/Time | Example 0 |
Input Seconds string secondsInput | 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 StringConvert the given Date/Time to an ISO string | key: convertToISOString
Input | Notes | Example |
---|---|---|
Input Date/Time data / Required dateTimeInput | Notes A reference to a JavaScript Date object or an ISO timestamp string | Example 2021-03-05T16:20:42.377Z |
Input Time Zone string timeZoneInput | 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 StringConvert the given Date/Time to an ISO string in local time using specified timezone | key: convertToLocalISOString
Input | Notes | Example |
---|---|---|
Input Date/Time data / Required dateTimeInput | Notes A reference to a JavaScript Date object or an ISO timestamp string | Example 2021-03-05T16:20:42.377Z |
Input Time Zone string timeZoneInput | 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/TimeChange the format of a timestamp given a format string | key: formatDateTime
Input | Default | Notes | Example |
---|---|---|---|
Input Date/Time data / Required dateTime | 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 format | 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 timeZone | Default etc/UTC | Notes Specifies the timezone to use for converting to a localized ISO timestamp string | Example America/Chicago |
#
Get Current Date/TimeReturn the current Date/Time in UTC | key: getCurrentDateTime
#
Output Example Payload{ "data": "2021-03-06T19:25:37.131Z"}