> For the complete documentation index, see [llms.txt](https://university.gonexa.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://university.gonexa.fr/doc/en/advanced-features/tag-extensions/format-dates-and-numbers.md).

# Format dates and numbers

Specify the format of a date or a number to make it easier to read, using the many available tag extensions.

## 📅 Customize the date format

**Choice of extensions**

On your Date-based tag, add the format specifier that matches the expected result.

| Format specifier                   | Description                                                                                                                                                                              | Example                             |
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
| `{!Etiquette\|NomAPI(d)}`          | Short date pattern                                                                                                                                                                       | 01/09/2023                          |
| `{!Etiquette\|NomAPI(D)}`          | Long date pattern                                                                                                                                                                        | Monday, September 10, 2023          |
| `{!Etiquette\|NomAPI(f)}`          | Long date + short time pattern                                                                                                                                                           | Monday, September 10, 2023 13:30    |
| `{!Etiquette\|NomAPI(F)}`          | Long date + long time pattern                                                                                                                                                            | Monday, September 10, 2023 13:30:50 |
| `{!Etiquette\|NomAPI(g)}`          | Short date + short time pattern                                                                                                                                                          | 10/09/2023 13:30:50                 |
| `{!Etiquette\|NomAPI(G)}`          | Short date + short time pattern                                                                                                                                                          | 10/09/2023 13:30                    |
| `{!Etiquette\|NomAPI(M)}`          | Month + day pattern                                                                                                                                                                      | September 10                        |
| `{!Etiquette\|NomAPI(R)}`          | RFC1123 pattern                                                                                                                                                                          | Monday, September 10, 2023 13:30:3  |
| `{!Etiquette\|NomAPI(T)}`          | Long time pattern                                                                                                                                                                        | 13:30:50                            |
| `{!Etiquette\|NomAPI(t)}`          | Short time pattern                                                                                                                                                                       | 13:30                               |
| `{!Etiquette\|NomAPI(Y)}`          | Year + month pattern                                                                                                                                                                     | September 2023                      |
| `{!Etiquette\|NomAPI(dd MM yyyy)}` | You can create complex tags with the following format specifiers, for example in the form `{!obj\|champ(dd MM yyyy)}`. You can also choose to use hyphens or "/" between each date part. | 01 09 2023                          |
| `{!Etiquette\|NomAPI(d)}`          | Day of the month, from 1 to 31                                                                                                                                                           | 1                                   |
| `{!Etiquette\|NomAPI(dddd)}`       | Full name of the day of the week                                                                                                                                                         | Monday                              |
| `{!Etiquette\|NomAPI(yyyy)}`       | 4-digit year                                                                                                                                                                             | 2023                                |

{% hint style="success" %}
**Example**

To display only the day and month of a quote's delivery date, add the **(M)** extension. `{!Quote|DeliveryDate}` displays "Expected delivery on 10/08/2027"\
`{!Quote|DeliveryDate(M)}` displays "Expected delivery on **August 10**"
{% endhint %}

## 🔢 Customize the number format

**Generate a number format**

| Format specifier                                                                                  | Field type  | Example             |
| ------------------------------------------------------------------------------------------------- | ----------- | ------------------- |
| `{!Etiquette\|NomAPI(C4)}`                                                                        | Currency    | €123.45             |
| `{!Etiquette\|NomAPI(D)}` — Optional: precision specifier `{!Etiquette\|NomAPI(D6)}`              | Decimal     | 1234 — -001234      |
| `{!Etiquette\|NomAPI(F)}` — Optional: precision specifier `{!Etiquette\|NomAPI(F4)}`              | Fixed-point | 1234.56 — 1234.5600 |
| `{!Etiquette\|NomAPI(P)}` — Optional: precision specifier `{!Etiquette\|NomAPI(P4)}`              | Percentage  | 100.00 % — -39.7 %  |
| `{!Etiquette\|NomAPI(N)}` — Optional: desired number of decimal places `{!Etiquette\|NomAPI(N3)}` | Number      | 1.234567 — 1.234    |

To learn more, see the **following article:** <https://learn.microsoft.com/fr-fr/dotnet/standard/base-types/standard-date-and-time-format-strings>


---

# 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://university.gonexa.fr/doc/en/advanced-features/tag-extensions/format-dates-and-numbers.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.
