Date Time
The Date Time node provides comprehensive date and time operations: arithmetic (add, subtract), comparison, extraction of date parts, rounding, formatting, parsing, and timestamp conversion. All operations support time zones and standard date format patterns.
Actions
| Action | Description |
|---|---|
dateTime:add | Add a duration to a date/time |
dateTime:subtract | Subtract a duration from a date/time |
dateTime:compareTwoDateTimes | Compare two date/time values |
dateTime:extract | Extract a part (year, month, day, etc.) from a date/time |
dateTime:round | Round a date/time to the nearest unit |
dateTime:format | Format a date/time into a string |
dateTime:now | Get the current date/time |
dateTime:parse | Parse a string into a date/time |
dateTime:diff | Calculate the difference between two date/times |
dateTime:toTimestamp | Convert a date/time to a Unix timestamp |
dateTime:fromTimestamp | Convert a Unix timestamp to a date/time |
dateTime:add
Adds a specified duration to a date/time value.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
dateTime | string | Yes | Input date/time (ISO 8601 or parseable string) |
amount | integer | Yes | Number of units to add |
unit | string | Yes | Time unit: years, months, weeks, days, hours, minutes, seconds, milliseconds |
timezone | string | No | Time zone (e.g., America/New_York). Defaults to UTC |
dateTime:subtract
Subtracts a specified duration from a date/time value.
Parameters
Same as add.
dateTime:compareTwoDateTimes
Compares two date/time values and returns the relationship (before, after, or equal).
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
dateTime1 | string | Yes | First date/time |
dateTime2 | string | Yes | Second date/time |
operator | string | No | Comparison: before, after, equals, beforeOrEquals, afterOrEquals. Defaults to returning the relationship |
dateTime:extract
Extracts a specific component from a date/time value.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
dateTime | string | Yes | Input date/time |
part | string | Yes | Part to extract: year, month, day, hour, minute, second, dayOfWeek, dayOfYear, weekOfYear, quarter |
timezone | string | No | Time zone for extraction |
dateTime:round
Rounds a date/time to the nearest specified unit.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
dateTime | string | Yes | Input date/time |
unit | string | Yes | Unit to round to: day, hour, minute, month |
mode | string | No | Rounding mode: floor, ceil, round. Defaults to round |
Result: 2025-06-15T14:00:00Z
dateTime:format
Formats a date/time into a string using a specified pattern.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
dateTime | string | Yes | Input date/time |
format | string | Yes | Output format pattern (e.g., yyyy-MM-dd, MM/dd/yyyy HH:mm:ss, EEE, MMM d yyyy) |
timezone | string | No | Target time zone |
locale | string | No | Locale for formatting (e.g., en-US, de-DE) |
Result: June 15, 2025 at 10:30 AM
dateTime:now
Returns the current date and time.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
timezone | string | No | Time zone. Defaults to UTC |
format | string | No | Output format pattern. Defaults to ISO 8601 |
dateTime:parse
Parses a date/time string using a specified input format.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | Yes | The date string to parse |
format | string | Yes | Expected input format pattern |
timezone | string | No | Time zone to assume if not present in the input |
dateTime:diff
Calculates the difference between two date/time values in the specified unit.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
dateTime1 | string | Yes | Start date/time |
dateTime2 | string | Yes | End date/time |
unit | string | Yes | Unit for the result: years, months, days, hours, minutes, seconds |
dateTime:toTimestamp
Converts a date/time string to a Unix timestamp (milliseconds since epoch).
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
dateTime | string | Yes | Input date/time |
dateTime:fromTimestamp
Converts a Unix timestamp to a date/time string.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
timestamp | number | Yes | Unix timestamp in milliseconds |
timezone | string | No | Output time zone. Defaults to UTC |
format | string | No | Output format. Defaults to ISO 8601 |
Connection
No connection required. This is a utility node that operates on in-memory values.
Output
All date/time actions return a result in this format:
For diff, the result is a number. For extract, the result is the extracted part (integer or string). For compareTwoDateTimes with an operator, the result is a boolean.