Skip to main content

AdjustDate

Uncontrolled node

Overview

The AdjustDate node modifies a given date by adding or subtracting specified amounts of time (years, months, days, hours, minutes, and seconds). It accepts a date string as input and outputs the adjusted date formatted according to your specifications. This node is useful for calculating future or past dates, scheduling tasks, or manipulating timestamps within your workflow.

The node performs calendar-aware adjustments:

  • Years and months are adjusted first to preserve calendar semantics (e.g., adding 1 month to January 31st results in February 28th/29th)
  • Days, hours, minutes, and seconds are added as precise time durations after the calendar adjustments

Inputs

InputTypeDescriptionDefault
InputDataThe base date to adjust. Accepts ISO 8601 strings, timestamps, or common date formats.-
YearsNumberNumber of years to add (positive) or subtract (negative).0
MonthsNumberNumber of months to add (positive) or subtract (negative).0
DaysNumberNumber of days to add (positive) or subtract (negative).0
HoursNumberNumber of hours to add (positive) or subtract (negative).0
MinutesNumberNumber of minutes to add (positive) or subtract (negative).0
SecondsNumberNumber of seconds to add (positive) or subtract (negative).0

Outputs

OutputTypeDescription
OutputDataThe adjusted date formatted as a string according to the selected format and timezone. Returns an error object if the input is invalid.

Runtime Behavior and Defaults

The node runs automatically whenever any input changes (uncontrolled behavior). It parses the input date, applies the adjustments in the order: years → months → days → hours → minutes → seconds, then formats the result.

Format Options

FormatDescriptionExample Output
YYYY-MM-DDStandard ISO date2025-12-31
YYYY-MM-DD HH:mm:ssISO date with time2025-12-31 14:30:00
YYYY-MM-DDTHH:mm:ssISO 8601 format2025-12-31T14:30:00
HH:mm:ssTime only14:30:00
MM/DD/YYYYUS date format12/31/2025
DD/MM/YYYYEuropean date format31/12/2025
YYYYMMDDCompact date20251231
YYYYMMDDHHmmssCompact datetime20251231143000
ISOISO 8601 with timezone2025-12-31T14:30:00Z
timestampUnix timestamp (milliseconds)1735653000000
timestamp_sUnix timestamp (seconds)1735653000

Timezone Handling

The node supports all standard IANA timezones (e.g., UTC, America/New_York, Europe/London, Asia/Tokyo). The default timezone is automatically detected from your browser settings, falling back to UTC if unavailable.

note

When adjusting dates across timezone boundaries or daylight saving time transitions, the node interprets the input as the specified timezone's local time and outputs the result in that same timezone.

Example Usage

Scenario: Calculate a subscription renewal date 1 year and 3 months from the current date.

  1. Connect a DatetimeNow node or provide a date string to the Input socket
  2. Set Years to 1 and Months to 3
  3. Leave Days, Hours, Minutes, and Seconds at 0 (or connect Number nodes with value 0)
  4. The Output will contain the future date formatted according to your selected format

Input Example:

  • Input: 2025-01-15 10:00:00
  • Years: 1
  • Months: 3

Output: 2026-04-15 10:00:00 (assuming default format YYYY-MM-DD HH:mm:ss)

Negative Adjustments: To find a date 7 days in the past, set Days to -7 while keeping other adjustment values at 0.