Date & Time
Description
Section titled “Description”The Date & Time node performs date operations: get the current date, add or subtract an amount of time to a date, or reformat an existing date into different output formats. The result is stored in a data field so the following nodes can use it.
It is equivalent to n8n’s Date & Time node.
The input date accepts ISO format, a numeric timestamp, or any expression resolvable with dynamic variables. If the input date is empty (or cannot be parsed), the current date and time are used.
Configuration
Section titled “Configuration”Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
| action | select | Yes | Operation: now (current date), format (reformat), add (add), subtract (subtract), startOf / endOf (start or end of day, week —Monday to Sunday—, month or year, in UTC). An unknown action returns an error |
| value | text | No | Date to process (ISO, timestamp or expression). Empty with now = current date. Supports dynamic variables |
| amount | number | No | Amount to add or subtract (only for add / subtract) |
| unit | select | No | Delta unit: years, months, weeks, days (default), hours, minutes, seconds |
| format | select | No | Output format: iso (ISO 8601, default), date (YYYY-MM-DD), time (HH:MM:SS), unix (seconds), locale (locale), sql (YYYY-MM-DD HH:MM:SS), month (YYYY-MM) |
| outputKey | text | No | Field name to store the result. Defaults to datetime |
Output
Section titled “Output”The node adds the result to data in the field named by outputKey (default datetime):
{ "customer": "Ana", "datetime": "2026-08-10T14:32:05.000Z"}Usage Examples
Section titled “Usage Examples”Get the current date in ISO format
Section titled “Get the current date in ISO format”{ "label": "Now", "action": "now", "format": "iso", "outputKey": "now"}Result: { "now": "2026-08-10T14:32:05.000Z" }.
Add 7 days to a date
Section titled “Add 7 days to a date”{ "label": "Due date", "action": "add", "value": "{{data.issue_date}}", "amount": "7", "unit": "days", "format": "date", "outputKey": "due_date"}Result: { "due_date": "2026-08-17" }.
Reformat a date to locale format
Section titled “Reformat a date to locale format”{ "label": "Locale format", "action": "format", "value": "{{data.timestamp}}", "format": "locale", "outputKey": "readable_date"}Get the Unix timestamp of 1 hour ago
Section titled “Get the Unix timestamp of 1 hour ago”{ "label": "1 hour ago", "action": "subtract", "amount": "1", "unit": "hours", "format": "unix", "outputKey": "since"}- If the input
datais an object, the result is added without losing existing fields; if not, it is wrapped in{ data, [outputKey] } - All calculations are done in UTC: adding days does not shift the hour for daylight saving, and adding or subtracting months or years does not overflow the end of the month (31 Oct − 1 month = 30 Sep; 29 Feb 2024 + 1 year = 28 Feb 2025)
- The
valuefield supports dynamic and cross-node variables:{{data.field}},{{@NodeName.field}} - Does not require credentials