> For the complete documentation index, see [llms.txt](https://help.sdocs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.sdocs.com/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-display-dates-in-different-formats.md).

# 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
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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` 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>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
