# How To: Display Dates in Different Formats

Use `format-date` when you want readable output instead of the default database date format.

### Problem

You need to show dates in readable formats rather than the database format (`YYYY-MM-DD`).

### Solution

**US Format (Month/Day/Year):**

```
{{!Opportunity.CloseDate format-date="MM/dd/yyyy"}}
```

**Result:** `01/15/2024`

**Long Format:**

```
{{!Opportunity.CloseDate format-date="MMMM dd, yyyy"}}
```

**Result:** `January 15, 2024`

**European Format:**

```
{{!Opportunity.CloseDate format-date="dd.MM.yyyy"}}
```

**Result:** `15.01.2024`

**With Day of Week:**

```
{{!Opportunity.CloseDate format-date="EEEE, MMMM dd, yyyy"}}
```

**Result:** `Monday, January 15, 2024`

**Just the Month:**

```
{{!Opportunity.CloseDate format-date="MMMM"}}
```

**Result:** `January`

**Just the Year:**

```
{{!Opportunity.CloseDate format-date="yyyy"}}
```

**Result:** `2024`

### Date Pattern Reference

| Pattern | Meaning                  | Example |
| ------- | ------------------------ | ------- |
| `yyyy`  | 4-digit year             | 2024    |
| `yy`    | 2-digit year             | 24      |
| `MMMM`  | Full month name          | January |
| `MMM`   | Short month name         | Jan     |
| `MM`    | Month number (01-12)     | 01      |
| `dd`    | Day with leading zero    | 05      |
| `d`     | Day without leading zero | 5       |
| `EEEE`  | Full day name            | Monday  |
| `EEE`   | Short day name           | Mon     |

### Tips

* Patterns are case sensitive. `MM` means month. `mm` means minutes.
* Month and day names always render in English.
* Create formula fields for other languages when needed.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.sdocs.com/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-display-dates-in-different-formats.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
