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