---
title: Format Date
description: Format a date
---

Turn a date into text in a fixed format, or into a Unix timestamp.

## What it does

Format Date reads **Date to format** and writes it as text in the field named by **Output field name**, using one of these **Format** choices:

| Format | Example for 5 March 2026 |
| --- | --- |
| MM/DD/YYYY | `03/05/2026` |
| YYYY/MM/DD | `2026/03/05` |
| MMMM DD YYYY | `March 05 2026` |
| MM-DD-YYYY | `03-05-2026` |
| YYYY-MM-DD | `2026-03-05` |
| DD/MM/YYYY | `05/03/2026` |
| DD-MM-YYYY | `05-03-2026` |
| Unix Timestamp | Seconds since 1 January 1970, for example `1772668800` at midnight UTC |
| Unix MS Timestamp | Milliseconds since 1 January 1970 |

Dates are formatted in your computer's local time zone. Month names are in English. The result is always text, including the timestamps.

## When to use it

* Show a date in a message, a sheet or a notification in a readable way.
* Send a date to an API that expects `YYYY-MM-DD` or a Unix timestamp.
* Build file names that sort by date, such as `report-2026-03-05`.

## Inputs and settings

**Date to format** accepts a picked date or an expression such as `{{ $input.createdAt }}`. Only the listed formats are available; there is no free-form pattern or time-of-day format.

## Outputs

The item holds the formatted text under **Output field name**, for example `{ day: "2026-03-05" }`. Turn on **Include input fields** to keep the incoming fields too.

## Dependencies and credentials

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

## Example workflow

Save selected text into a dated file:

1. [Context Menu](/nodes/builtin/trigger/contextmenu/) trigger, **Menu Contexts** `Selection`.
2. [Get Current Date](/nodes/builtin/datatransformation/datetime/getcurrentdate/), **Output field name** `now`, **Include input fields** on.
3. Format Date, **Date to format** `{{ $input.now }}`, **Format** `YYYY-MM-DD`, **Output field name** `day`, **Include input fields** on.
4. [Save as File](/nodes/builtin/datatransformation/saveasfile/), **Content** `{{ $input.selectionText }}`, **File name** `notes-{{ $input.day }}`, **File type** `txt`.

## Common issues

* **The output says "Invalid Date".** The incoming value is not a date the browser can read. Use an ISO date such as `2026-03-05` or `2026-03-05T09:30:00Z`.
* **The date is one day off.** A UTC time near midnight moved to the previous or next day in your local time zone. Include the time and time zone in the input.
* **A later number comparison fails on the timestamp.** The timestamp formats return text, not a number. Compare it as text, or set the field type to Number in the comparing node.

## Related nodes

* [Get Current Date](/nodes/builtin/datatransformation/datetime/getcurrentdate/): get "now" to format.
* [Extract Part Of A Date](/nodes/builtin/datatransformation/datetime/extractpartofadate/): get a single number such as the year.
* [Text / Formatter](/nodes/builtin/datatransformation/text-formatter/): combine the date with other text.