Date & Time
core.date_time · version 2 · Transform
Parse, format, shift, round and compare dates.
Ports
| Port | Kind | Label | Required | Max connections |
|---|---|---|---|---|
| input 0 | main | |||
| output 0 | main |
Credentials
This node uses no credentials.
Parameters
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
operation | options | "getCurrentDate" | One of getCurrentDate, addToDate, subtractFromDate, formatDate, roundDate, getTimeBetweenDates, extractDate. | ||
includeTime | boolean | true | operation = getCurrentDate | Include current time. | |
magnitude | string | operation = addToDate, subtractFromDate | Date to change. | ||
timeUnit | options | "days" | operation = addToDate, subtractFromDate | Time unit. One of years, quarters, months, weeks, days, hours, minutes, seconds, milliseconds. | |
duration | number | 0 | operation = addToDate, subtractFromDate | Amount. | |
date | string | operation = formatDate, roundDate, extractDate | |||
format | string | "MM/dd/yyyy" | operation = formatDate | ||
customFormat | string | operation = formatDate | Custom format (Luxon tokens). | ||
mode | options | "roundDown" | operation = roundDate | One of roundDown, roundUp. | |
startDate | string | operation = getTimeBetweenDates | Start date. | ||
endDate | string | operation = getTimeBetweenDates | End date. | ||
units | multi_options | ["day"] | operation = getTimeBetweenDates | ||
part | string | "month" | operation = extractDate | ||
outputFieldName | string | Output field name. | |||
options | collection | {} | |||
options.includeInputFields | boolean | false | Keep input fields. | ||
options.timezone | string | ||||
options.fromFormat | string | Input format (Luxon tokens). | |||
options.isoString | boolean | false | Output as ISO duration. |
Import
Exported workflows that use these node types import to this node. Unverified ranges import with a parameter warning until parity fixtures confirm them; see Migrating.
| Source type | Version range | Status | Fixtures |
|---|---|---|---|
n8n-nodes-base.dateTime | 1 | unverified | |
n8n-nodes-base.dateTime | 2 | unverified |