Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Date & Time

core.date_time · version 2 · Transform

Parse, format, shift, round and compare dates.

Ports

PortKindLabelRequiredMax connections
input 0main
output 0main

Credentials

This node uses no credentials.

Parameters

NameTypeDefaultRequiredShown whenDescription
operationoptions"getCurrentDate"One of getCurrentDate, addToDate, subtractFromDate, formatDate, roundDate, getTimeBetweenDates, extractDate.
includeTimebooleantrueoperation = getCurrentDateInclude current time.
magnitudestringoperation = addToDate, subtractFromDateDate to change.
timeUnitoptions"days"operation = addToDate, subtractFromDateTime unit. One of years, quarters, months, weeks, days, hours, minutes, seconds, milliseconds.
durationnumber0operation = addToDate, subtractFromDateAmount.
datestringoperation = formatDate, roundDate, extractDate
formatstring"MM/dd/yyyy"operation = formatDate
customFormatstringoperation = formatDateCustom format (Luxon tokens).
modeoptions"roundDown"operation = roundDateOne of roundDown, roundUp.
startDatestringoperation = getTimeBetweenDatesStart date.
endDatestringoperation = getTimeBetweenDatesEnd date.
unitsmulti_options["day"]operation = getTimeBetweenDates
partstring"month"operation = extractDate
outputFieldNamestringOutput field name.
optionscollection{}
options.includeInputFieldsbooleanfalseKeep input fields.
options.timezonestring
options.fromFormatstringInput format (Luxon tokens).
options.isoStringbooleanfalseOutput 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 typeVersion rangeStatusFixtures
n8n-nodes-base.dateTime1unverified
n8n-nodes-base.dateTime2unverified