> For the complete documentation index, see [llms.txt](https://docs.wem.io/platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wem.io/platform/wemreference/data-types/date-time.md).

# Date Time

### Description

This is the datatype that stores date and time information. The contents of a date consist of several parts in the following units.

* Year&#x20;
* Month&#x20;
* Week&#x20;
* Day&#x20;
* Hour&#x20;
* Minute&#x20;
* Second&#x20;
* Millisecond

&#x20;These units can be used in date-time functions in the expression editor.

### Formatting

Formatting of date time values can also be controlled using format strings. Some examples for formatting `'2014-08-21 14:30'` are shown below.&#x20;

```
(empty)       /* 21-8-2014 14:30:00 */
MM-dd-yy      /* 08-21-14 */
MMMM d yyyy   /* August 21 2014 */
dddd MMM d    /* Thursday Aug 21 */
d/M/yy HH:mm  /* 21/8/14 14:30 */
hh:mm:ss      /* 02:30:00 */
h:mm tt       /* 2:30 PM */
```

### Unknown

An unknown value can be written as `UnknownDateTime`.

### Examples

```
'2014-08-21'           /* Date without time */
'2014-08-21T14:30:00'  /* Date with time    */
```

### Remarks

The default formatting is determined by the language settings in your [Portal Settings](/platform/wemmodeler/project-settings/portal-settings.md#change-language-settings).&#x20;


---

# 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.wem.io/platform/wemreference/data-types/date-time.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.
