# Formatting Date/Time

Dates in the Platform are stored as strings in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, which has the following structure:

`YYYY-MM-ddTHH:mm.ss.SSS`

Examples:

* `2024` — year 2024
* `2023-02` — February 2023
* `2022-04-12` — 12th of April, 2022
* `1987-03-31T04:30` — 31st of March 1987, 4:30 a.m. UTC

Formatting dates has three use cases:

* Setting standard formatting for data structure field
* [Import](/data/import-and-export.md)
* [Template formatting](/template-system/basics-of-template-system.md#formatting-date)

#### Examples

|         |            |
| ------- | ---------- |
| DD MMM  | 24 June    |
| DD.MM.Y | 24.06.2023 |

Formatting date/time details:&#x20;

| Symbol | Meaning           | Type                     | Mask                           | Example                             |
| ------ | ----------------- | ------------------------ | ------------------------------ | ----------------------------------- |
| C      | Century, AD       | number                   | CC.dd.MM.yyyy                  | 20.31.12.1909                       |
| Y      | Year, AD          | number                   | Y                              | 1996                                |
| w      | Week in a year    | number                   | ww                             | 27                                  |
| e      | Day of a week     | number                   | e                              | 2                                   |
| E      | Day of a week     | text                     | <p>EEEE</p><p>E</p>            | <p>Tuesday</p><p>Tue</p>            |
| y      | Year              | number                   | y                              | 1996                                |
| D      | Day in a year     | number                   | D                              | 189                                 |
| M      | Month in a year   | <p>text</p><p>number</p> | <p>MMMM</p><p>MMM</p><p>MM</p> | <p>July</p><p>Jul</p><p>07</p>      |
| d      | Day in a month    | number                   | dd                             | 31                                  |
| a      | AM/PM             | text                     | <p>a </p><p>a</p>              | <p>AM </p><p>PM</p>                 |
| H      | Hour (0\~23)      | number                   | H                              | 0                                   |
| m      | Minute            | number                   | mm                             | 36                                  |
| s      | Second            | number                   | ss                             | 25                                  |
| S      | millisecond       | number                   | SSS                            | 783                                 |
| z      | Time zone         | text                     | z                              | Pacific Standard Time; PST          |
| Z      | Time zone / shift | text                     | Z                              | -0800; -08:00; America/Los\_Angeles |

### Formatting *date* field type

![](/files/-M_5NZQQVQ8kNWLBte0E)

Time constraints field:

```javascript
{
   "hours": {
      "min": 1,
      "max": 15,
      "step": 3
   },
   "minutes": {
      "min": 10,
      "max": 30,
      "step": 20
   }
}
```

{% hint style="info" %}
Remember, these constraints only affect web page components and user input in the platform. Scenarios and API calls are **not limited.**
{% endhint %}

### Time zones

Dates are stored in the UTC format. If you select 'use user's local time zone' in settings, the platform's interface and web-page builder-based apps will automatically use the user's browser time zone. However, when working with dates in scenarios, you must manage the time zone manually using the `moment({{your_date}}).zone(Z).format();`function, where `Z` represents the timezone offset, such as `-3` or `+10` .


---

# 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://readme.directual.com/data/data-types/formatting-date-time-data.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.
