Date Time
Node: dateTime · Full type: n8n-nodes-base.dateTime · Version: 2
Ergonomic keyword available: DATETIME — see NFLOW.md for shorter syntax.
Operations
addToDate
| Parameter |
Type |
Default |
Details |
magnitude |
string |
"" |
required |
timeUnit |
options |
"days" |
required; years, quarters, months, weeks, days, hours, minutes, seconds, ... (9 total) |
duration |
number |
0 |
|
outputFieldName |
string |
"newDate" |
|
options |
collection |
{} |
keys: includeInputFields |
| Parameter |
Type |
Default |
Details |
date |
string |
"" |
|
part |
options |
"month" |
year, month, week, day, hour, minute, second |
outputFieldName |
string |
"datePart" |
|
options |
collection |
{} |
keys: includeInputFields |
| Parameter |
Type |
Default |
Details |
date |
string |
"" |
|
format |
options |
"MM/dd/yyyy" |
custom, MM/dd/yyyy, yyyy/MM/dd, MMMM dd yyyy, MM-dd-yyyy, yyyy-MM-dd, X, x |
customFormat |
string |
"" |
|
outputFieldName |
string |
"formattedDate" |
|
options |
collection |
{} |
keys: includeInputFields, fromFormat, timezone |
getCurrentDate
| Parameter |
Type |
Default |
Details |
includeTime |
boolean |
true |
|
outputFieldName |
string |
"currentDate" |
|
options |
collection |
{} |
keys: includeInputFields, timezone |
getTimeBetweenDates
| Parameter |
Type |
Default |
Details |
startDate |
string |
"" |
|
endDate |
string |
"" |
|
units |
multiOptions |
[...] |
multi: year, month, week, day, hour, minute, second, millisecond |
outputFieldName |
string |
"timeDifference" |
|
options |
collection |
{} |
keys: includeInputFields, isoString |
roundDate
| Parameter |
Type |
Default |
Details |
date |
string |
"" |
|
mode |
options |
"roundDown" |
roundDown, roundUp |
toNearest |
options |
"month" |
year, month, week, day, hour, minute, second |
to |
options |
"month" |
month |
outputFieldName |
string |
"roundedDate" |
|
options |
collection |
{} |
keys: includeInputFields |
subtractFromDate
| Parameter |
Type |
Default |
Details |
magnitude |
string |
"" |
required |
timeUnit |
options |
"days" |
required; years, quarters, months, weeks, days, hours, minutes, seconds, ... (9 total) |
duration |
number |
0 |
|
outputFieldName |
string |
"newDate" |
|
options |
collection |
{} |
keys: includeInputFields |
Parameter Details
options children:
| Parameter |
Type |
Default |
Details |
includeInputFields |
boolean |
false |
|
timezone |
string |
"" |
|
Example
NODE "dateTime" AS "Date Time" {
operation: "addToDate",
magnitude: {{ $json.magnitude }}
}