---
title: Round a Date
description: Round a date up or down to a chosen unit of time
---

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

## What it does

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.

## When to use it

* 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.

## Inputs and settings

**Date to round** accepts a picked date or an expression such as `{{ $input.createdAt }}`.

## Outputs

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

## Dependencies and credentials

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

## Example workflow

Build a "this month" date range for an API call:

1. [Get Current Date](/nodes/builtin/datatransformation/datetime/getcurrentdate/), **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](/nodes/builtin/core/http-request/) with query params `from` = `{{ $input.from }}` and `to` = `{{ $input.to }}`.

## Common issues

* **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](/nodes/builtin/datatransformation/datetime/addtoadate/) 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](/nodes/builtin/datatransformation/datetime/formatdate/) 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`.

## Related nodes

* [Add To A Date](/nodes/builtin/datatransformation/datetime/addtoadate/): shift the rounded date.
* [Format Date](/nodes/builtin/datatransformation/datetime/formatdate/): turn it into text.
* [Extract Part Of A Date](/nodes/builtin/datatransformation/datetime/extractpartofadate/): read a single part of a date.