Skip to main content

Date & Time

Works with dates without writing expressions: get the current time, format or parse a date, add or subtract time, measure the difference between two dates, and convert between time zones.

Parameters​

Which fields appear depends on the Operation.

NameShown forDefaultDescription
Operation (operation)allFormat a datenow, format, parse, add, subtract, diff, convertTimezone — see Operations. Required.
Date (date)all except now—The input date: an ISO 8601 string (2026-01-31T09:00:00Z), epoch seconds or milliseconds, or an expression such as {{ $now }}. Required for those operations.
Input format (optional) (inputFormat)parse—Exact format of Date, e.g. dd/MM/yyyy HH:mm, or unix / unixMs for epoch values.
Amount (amount)add, subtract1How much to add or subtract. Decimals are allowed.
Unit (unit)add, subtract, diffDaysmilliseconds, seconds, minutes, hours, days, weeks, months, years.
End date (default: now) (endDate)diffNowThe date to compare against.
Output format (format)all except diffisoiso, unix, unixMs, rfc1123, date (yyyy-MM-dd), time (HH:mm:ss), or a custom pattern such as yyyy-MM-dd HH:mm.
Time zone (timezone)all except diffUTC / unchangedOutput zone, e.g. Europe/London. For convertTimezone it is the target zone and is required.
Source time zone (sourceTimezone)all except nowUTCZone to assume for dates written without an offset (e.g. 2026-01-31 09:00). Ignored when the date has Z or an offset.

Time zones are IANA ids (America/New_York, Europe/Berlin) or UTC. An unknown zone fails the step.

Custom formats and Input format use .NET date patterns: yyyy year, MM month, dd day, HH 24-hour, hh 12-hour, mm minutes, ss seconds, fff milliseconds, tt AM/PM, ddd/dddd day name, MMM/MMMM month name, zzz offset. Put literal text in single quotes, e.g. dd 'of' MMMM.

Operations​

OperationWhat it does
Current date & time (now)The current time, in Time zone if set.
Format a date (format)Re-formats Date with Output format, in Time zone if set.
Parse text into a date (parse)Reads Date (using Input format when given) and outputs a normalised date.
Add to a date (add) / Subtract from a date (subtract)Shifts Date by Amount × Unit. Days, weeks, months and years are calendar-aware in the chosen zone, so adding 1 day across a daylight-saving change keeps the same wall-clock time.
Difference between dates (diff)End date minus Date in Unit. Negative when End date is earlier.
Convert time zone (convertTimezone)Shows the same instant in Time zone.

Ports​

PortDescription
main (input)The step(s) Date & Time runs after.
outputSee below.

Output​

now, parse, add, subtract and convertTimezone:

{
"result": "2026-03-02 09:00",
"iso": "2026-03-02T09:00:00.0000000+00:00",
"unix": 1772442000,
"unixMs": 1772442000000,
"timezone": "Europe/London"
}
FieldDescription
resultThe date in Output format (always text).
isoISO 8601 with offset.
unix / unixMsEpoch seconds / milliseconds (numbers).
timezoneThe output zone id, UTC, or the offset (e.g. +02:00) when no zone was set.

format returns result, iso and timezone only.

diff returns a number and the unit:

{ "result": 13.5, "unit": "days" }

Milliseconds through weeks can be fractional; months and years are whole calendar months/years elapsed.

Example​

Work out a follow-up date three days after an order, formatted for UK customers:

  • Operation: Add to a date
  • Date: {{ $trigger.body.createdAt }} (e.g. 2026-03-02T09:00:00Z)
  • Amount: 3
  • Unit: Days
  • Output format: dddd d MMMM yyyy
  • Time zone: Europe/London

{{ $nodes['Date & Time'].result }} → Thursday 5 March 2026.

How many days until a subscription renews:

  • Operation: Difference between dates
  • Date: {{ $now }}
  • End date: {{ $nodes['Get Subscription'].renewsAt }}
  • Unit: Days

Notes​

  • Numbers larger than 100,000,000,000 are read as epoch milliseconds, smaller ones as epoch seconds.
  • Fractional months or years in Add/Subtract add the fraction as 30 or 365 days.
  • For inline date maths inside other fields, the $dt helper and $now are available in expressions.