> For the complete documentation index, see [llms.txt](https://docs.sprinthub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sprinthub.com/en/strategies/tokens/using-date-and-time-tokens.md). Agents can also search and read this documentation through its [MCP server](https://docs.sprinthub.com/~gitbook/mcp).

# Using Date and Time Tokens

How to work with date tokens and time functions.

## About the Field Type

In Sprinthub, you can work with several date and time-related tokens. By default, date values are stored in the format **ISO**, always in the **UTC** — for example: `2024-10-11T16:12:47.750Z`. However, it is possible to **format these dates** or even generate **relative dates**, as we will see throughout this article.

In addition, the platform allows you to create **custom fields** of **Date and Time** or just **Date**, offering flexibility to adapt to your process needs, as shown in the example below:

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FstVfQzCAG2DnHHchZeim%2Fimage.png?alt=media&amp;token=cd2dc4a3-b592-45ce-bf19-ae038ee03515" alt=""><figcaption><p><em>'Trial Lesson' field in the field list.</em></p></figcaption></figure>

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FiFsrnwRGta9lwbKvESZD%2Fimage.png?alt=media&amp;token=c2bc8661-c2a1-458f-bc74-4753ef444b54" alt=""><figcaption><p><em>'Trial Lesson' field in the lead's full data.</em></p></figcaption></figure>

## Formatting Lead Fields

To format a field of the type **Date and Time**, you can use different token options:

* **\[date]** → displays only day, month, and year in Brazilian format.
* **\[datetime]** → works like `[date]`, but also includes the time.
* **\[yyyy-mm-dd]** → keeps the international standard (ISO 8601).
* **\[yyyy-dd-mm]** → reverses the order of day and month in the year-first format.&#x20;
* **\[unix]** → converts the date to the *Unix Timestamp* (total seconds since 01/01/1970), ideal for API integrations or databases.
* **\[month]** → extracts only the month number (01 to 12).
* **\[year]** → extracts only the four-digit year.
* **\[day]** → extracts only the day of the month.
* **\[time]** → displays only the time (hours and minutes), ignoring the date.

The value in brackets must be placed **before the token alias** at the time of substitution.\
For example:

```
{contactfield=[date]trial_lesson}
```

Below is a practical example showing how this token is replaced in each of the formats:

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FdVFGN4MdXTxT0MHJLD6t%2Fimage.png?alt=media&amp;token=281f6ad7-1b67-4f9b-bc3b-d1dcb1e9fe0f" alt=""><figcaption><p><em>Tokens used in a SAC360 support interaction.</em></p></figcaption></figure>

## Date Functions

In some cases, it may be useful to generate relative dates in real time, for example, to get the **current date** at the moment an automation is executed, calculate **the next day** or even **a week ahead**.

This is done through the **tokens** **`function`**.

* To the **right of the equals sign** is the **time reference** (e.g.: `yesterday`, `tomorrow`).
* The **formatting** (optional) can be placed in the **middle of the token**.

#### Common examples:

* One year ago → `{function=lastYear}`
* Last month → `{function=lastMonth}`
* Yesterday → `{function=yesterday}`
* Last week → `{function=lastWeek}`
* Today → `{function=today}`
* It also works for `nextYear`, `nextMonth`, `tomorrow`, etc.

#### Example with formatting, run on 09/27/2025:

```
{function=[date]tomorrow} -> 09/28/2025
```

These tokens can be used in different parts of Sprinthub, such as in support interactions, message-sending automations, or even in Webhook integrations with external platforms.
