Aller au contenu
Agentic Workflowdocs
v0.8.2Installer gratuitement

nœuds / builtin / datatransformation / datetime

Subtract From A Date

Subtract a number of days from a date

Données ExtensionApplication web

Ce contenu n’est pas encore disponible dans votre langue.

Move a date back by a number of years, months, days, hours or other units.

Subtract From A Date takes Date to subtract from, removes Duration of the chosen Time unit to subtract, and writes the new date into a field named by Output field name.

  • Units: year, quarter (3 months), month, week (7 days), day, hour, minute, second.
  • The calculation uses your computer’s local time zone.
  • Going back a month from the 31st rolls over when the earlier month is shorter: 31 March minus 1 month gives 3 March (or 2 March in a leap year), not 28 February.
  • Build the start of a “last 7 days” or “last 24 hours” window.
  • Work out when a reminder should fire before a deadline.
  • Find a date one year ago for a comparison.
RéglageTypeCe que cela fait
Date to subtract from (obligatoire)Date and timeThe date to subtract days from.
Time unit to subtract (obligatoire)ChoiceThe time unit to subtract from the date. Options: year, quarter, month, week, day, hour, minute, second.
Duration (obligatoire)NumberThe duration to subtract from the date.
Output field name (obligatoire)TextThe name of the output field.
Options GroupThe options for the node.
Options › Include input fields ToggleWhether to include the input fields in the output. Par défaut : Off

Date to subtract from accepts a picked date or an expression such as {{ $input.deadline }}. ISO dates (2026-03-01, 2026-03-01T09:30:00Z) are the safest format.

  • Output

The item holds the new date under Output field name. Turn on Include input fields to keep the incoming fields next to it.

None. This node needs no connection and has no slots for other nodes.

Keep only feed items from the last 24 hours:

  1. RSS Feed Read, URL of a news feed.
  2. Split Out, Field To Split Out items, Output field name article, so each article becomes its own item.
  3. Get Current Date, Output field name now, Include input fields on.
  4. Subtract From A Date, Date to subtract from {{ $input.now }}, Time unit to subtract day, Duration 1, Output field name since, Include input fields on.
  5. Filter: {{ $input.article.isoDate }} is after {{ $input.since }}, type Date-Time.
  • The output is “Invalid Date” or empty. The incoming value is not a date the browser understands. Use an ISO date such as 2026-03-01.
  • The month result lands in the wrong month. Subtracting months from the 29th to the 31st can roll forward into the next month. Round the date down to month first with Round a Date when you only care about the month.
  • The new date is missing after the node. With Include input fields on, an incoming field with the same name as Output field name replaces the result. Use a different name.
Modifier cette page

Dernière mise à jour :

Was this page useful?
Demander à Aria à propos de Subtract From A Date