Aller au contenu
Agentic Workflowdocs
v0.8.2Installer gratuitement

nœuds / builtin / datatransformation / datetime

Round a Date

Round a date up or down to a chosen unit of time

Données ExtensionApplication web

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

Snap a date to the start or the end of a year, month, week, day, hour or minute.

Round a Date reads Date to round and moves it to a boundary of the chosen Unit:

  • Direction down gives the start of the unit. 2026-03-05 14:37 rounded down to day is 2026-03-05 00:00:00.
  • Direction up gives the very end of the unit. Rounded up to day it is 2026-03-05 23:59:59.999; up to month it is the last millisecond of 31 March.

Boundaries follow your computer’s local time zone. Weeks start on Sunday.

  • Get “start of today” or “start of this month” to filter recent items.
  • Compute the end of a billing or reporting period.
  • Group events by day or hour so timestamps in the same period match.
RéglageTypeCe que cela fait
Date to round (obligatoire)Date and timeThe date to round.
Unit (obligatoire)ChoiceThe unit to round the date to. Options: year, month, week, day, hour, minute.
Direction (obligatoire)ChoiceRound down (start of the unit) or up (end of the unit). Options: down, up.
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 round accepts a picked date or an expression such as {{ $input.createdAt }}.

  • Output

The item holds the rounded 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.

Build a “this month” date range for an API call:

  1. Get Current Date, Output field name now.
  2. Round a Date, Date to round {{ $input.now }}, Unit month, Direction down, Output field name from, Include input fields on.
  3. Round a Date, Date to round {{ $input.now }}, Unit month, Direction up, Output field name to, Include input fields on.
  4. Http Request with query params from = {{ $input.from }} and to = {{ $input.to }}.
  • The week starts on the wrong day. Weeks start on Sunday. To start on Monday, round down to week and then Add To A Date 1 day (careful on Sundays).
  • The result is a few hours off. The rounding happens in your local time zone, and the date is shown in UTC. Format it with Format Date to see local time.
  • The output is empty or “Invalid Date”. The input is not a readable date. Use an ISO date such as 2026-03-05T14:37:00.
Modifier cette page

Dernière mise à jour :

Was this page useful?
Demander à Aria à propos de Round a Date