Skip to content

Round a Date

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

Takes a date and snaps it to the boundary of a time unit — for example the start of the day, the end of the month, or the start of the hour. Rounding down returns the start of the unit; rounding up returns the end of the unit.

Use this node to normalise timestamps (e.g. bucket events by day or month), to compute the start or end of a billing/reporting period, or to align dates before grouping or comparison.

SettingNotes
Date to roundThe date to round. Accepts the same date input as the other Date & Time nodes.
UnitThe unit to round to: year, month, week, day, hour, or minute.
Directiondown for the start of the unit (floor), up for the end of the unit (ceil).
Output field nameName of the field the rounded date is written to.
Include input fieldsOptionally keep the incoming fields alongside the result.

Returns the rounded value as a date in the field named by Output field name. When Include input fields is enabled, the incoming fields are spread in alongside it.

  • No credential or node dependency is required. The node runs entirely in the browser.

Feed a timestamp into Round a Date, set Unit to day and Direction to down, and the output is midnight at the start of that day — handy for grouping records by date.

  • week uses the default locale, where the week starts on Sunday.
  • Make sure the input value is a valid date; an unparseable value will fail the node.