> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/flow/tutorials/components/timeline/customizing-date-format-in-the-timeline-component-using-luxon.md). Agents can also search and read this documentation through its [MCP server](https://docs.avonnicomponents.com/~gitbook/mcp).

# Format dates on a Timeline

Choose how each Timeline item shows its date, from "Yesterday 4:15 PM" to "2 days ago" or your own pattern, with the Format setting.

A support agent scanning the Harbor Point Logistics history cares about how recent things are: "2 days ago" reads faster than "November 01, 2026, 4:15 PM". The **Avonni Timeline** lets you pick the date style of every item in one setting, **Format**, with four choices: **Standard**, **Relative**, **Preset** and **Custom**.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FtdleKiUAQis3eXV5jvns%2Ftimeline-customizing-date-format-in-the-timeline-component-using-luxon-result.png?alt=media" alt="Timeline items each showing how long ago or how soon the activity is, such as 2 days ago" width="440"><figcaption><p>Relative dates show how recent each activity is</p></figcaption></figure>

## Before you start

* A Screen Flow with the **Avonni Timeline** component already showing activities. [Display Tasks](https://docs.avonnicomponents.com/flow/tutorials/components/timeline/display-tasks.md) builds it.
* The **Start Date** data mapping points to a Date or Date/Time field. To show a time, map a Date/Time field (for example `CreatedDate`): a Date field has no time.

## Steps

{% stepper %}
{% step %}

### Open the Item Date Format section

* Select the **Avonni Timeline** on the screen and click **Open Component Builder**.
* In the **Properties** tab, expand the **Item Date Format** section. It is collapsed on a new Timeline and opens by itself once a format is set.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FxJ3UOKPZIwTMwH26s9qN%2Ftimeline-customizing-date-format-in-the-timeline-component-using-luxon-panel.png?alt=media" alt="Item Date Format section with Format set to Preset and the Date Medium with Weekday preset selected" width="320"><figcaption><p>Format decides which of the next fields appears</p></figcaption></figure>
{% endstep %}

{% step %}

### Choose a Format

In **Format**, select one of the four options:

| Format       | What the user sees                                                                       | Example                                |
| ------------ | ---------------------------------------------------------------------------------------- | -------------------------------------- |
| **Standard** | `Today` or `Yesterday` with the time for the last two days, then the month, day and time | `Yesterday 4:15 PM`, `Oct 28, 9:30 AM` |
| **Relative** | How long ago, or how soon                                                                | `2 days ago`, `in 3 weeks`             |
| **Preset**   | A ready-made date or time style, chosen from a list                                      | `Nov 3, 2026`                          |
| **Custom**   | A pattern you write with date tokens                                                     | `November 03, 2026, 9:30 AM`           |

**Custom** is the default, with the pattern `LLLL dd, yyyy, t`. A Timeline built before the **Format** setting existed keeps its old pattern under **Custom**.
{% endstep %}

{% step %}

### With Preset, pick the style

* In **Preset**, choose a style. It defaults to **Date Medium (Oct 14, 1983)**. Each option shows its own example, so you can choose by sight.

| Group                       | Presets                                                                                                                                                                                                                                                                                       |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Date only                   | **Date Short (10/14/1983)**, **Date Medium (Oct 14, 1983)**, **Date Medium with Weekday (Fri, Oct 14, 1983)**, **Date Full (October 14, 1983)**, **Date Huge (Friday, October 14, 1983)**                                                                                                     |
| Time only, 12 hours         | **Time Simple (1:30 PM)**, **Time with Seconds (1:30:23 PM)**, **Time with Short Offset (1:30:23 PM EDT)**, **Time with Long Offset (1:30:23 PM Eastern Daylight Time)**                                                                                                                      |
| Time only, 24 hours         | **Time 24h Simple (13:30)**, **Time 24h with Seconds (13:30:23)**, **Time 24h with Short Offset (13:30:23 EDT)**, **Time 24h with Long Offset (13:30:23 Eastern Daylight Time)**                                                                                                              |
| Date and time               | **Date/Time Short (10/14/1983, 1:30 PM)**, **Date/Time Medium (Oct 14, 1983, 1:30 PM)**, **Date/Time Full (October 14, 1983 at 1:30 PM EDT)**, **Date/Time Huge (Friday, October 14, 1983 at 1:30 PM Eastern Daylight Time)**                                                                 |
| Date and time, with seconds | **Date/Time Short with Seconds (10/14/1983, 1:30:23 PM)**, **Date/Time Medium with Seconds (Oct 14, 1983, 1:30:23 PM)**, **Date/Time Full with Seconds (October 14, 1983 at 1:30:23 PM EDT)**, **Date/Time Huge with Seconds (Friday, October 14, 1983 at 1:30:23 PM Eastern Daylight Time)** |
| {% endstep %}               |                                                                                                                                                                                                                                                                                               |

{% step %}

### With Custom, write the pattern

* In **Custom**, type a pattern made of Luxon tokens. Tokens are case sensitive: `MM` is the month, `mm` the minutes.
* To add your own words, wrap them in single quotes: `'Due' ccc, LLL d` gives `Due Tue, Nov 3`.

The tokens you will use most:

| Token              | Shows                          | Example                                          |
| ------------------ | ------------------------------ | ------------------------------------------------ |
| `d` / `dd`         | Day of the month               | `3` / `03`                                       |
| `ccc` / `cccc`     | Weekday                        | `Tue` / `Tuesday`                                |
| `L` / `LL`         | Month number                   | `11` / `11`                                      |
| `LLL` / `LLLL`     | Month name                     | `Nov` / `November`                               |
| `yy` / `yyyy`      | Year                           | `26` / `2026`                                    |
| `h` / `hh`         | Hour, 12-hour clock            | `9` / `09`                                       |
| `H` / `HH`         | Hour, 24-hour clock            | `9` / `09`                                       |
| `mm`               | Minutes                        | `05`                                             |
| `a`                | AM or PM                       | `PM`                                             |
| `t` / `T`          | Localized time, 12 or 24 hours | `9:05 PM` / `21:05`                              |
| `D` / `DD` / `DDD` | Localized date, short to full  | `11/3/2026` / `Nov 3, 2026` / `November 3, 2026` |
| `W`                | Week number                    | `45`                                             |
| `q`                | Quarter                        | `4`                                              |
| `ZZZZ`             | Time zone abbreviation         | `EST`                                            |

The full list is in [Luxon's table of tokens](https://moment.github.io/luxon/#/formatting?id=table-of-tokens).
{% endstep %}

{% step %}

### Save and test

* Click **Done**, save the flow and run it.
* Every item shows its date in the chosen style. With **Relative**, an activity logged two days ago reads `2 days ago`.

{% hint style="warning" %}
Use **Relative** with a Date/Time field, such as an Event's **Start** or a record's **Created Date**. On a Date field with no time, such as a Task's **Due Date Only**, the relative text can be off by a day or more. Pick a date-only **Preset** for those.
{% endhint %}
{% endstep %}
{% endstepper %}

{% hint style="info" %}
In the horizontal layout, the item date appears in the popover that opens when the user hovers over an item. See [Create a horizontal activity timeline](https://docs.avonnicomponents.com/flow/tutorials/components/timeline/create-a-horizontal-activity-timeline.md).
{% endhint %}

## Troubleshooting

<details>

<summary>Every date shows 12:00 AM</summary>

**Start Date** points to a Date field, such as a Task's **Due Date Only**, which has no time. The default format prints a time anyway. Set **Format** to **Preset** and pick a date-only preset such as **Date Medium (Oct 14, 1983)**, or use **Custom** with a pattern without time, such as `LLL dd, yyyy`.

</details>

## Related tutorials

* [Display Tasks](https://docs.avonnicomponents.com/flow/tutorials/components/timeline/display-tasks.md): build the Timeline whose dates this page formats.
* [Group a Timeline by month](https://docs.avonnicomponents.com/flow/tutorials/components/timeline/group-a-timeline-by-month.md): pair a short date style with month sections.
* [Timeline](https://docs.avonnicomponents.com/flow/flow-components/timeline.md): every setting of the component.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.avonnicomponents.com/flow/tutorials/components/timeline/customizing-date-format-in-the-timeline-component-using-luxon.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
