# Date

`Returns: Date`

Displays a calendar UI for selecting dates which are saved as a DateTime value.

## Data Type Definition Example

![Data Type Definition Example](/files/IICUiB9ZzpbqIdrNZzUY)

The only setting that is available for manipulating the Date property is to set a format. By default the format of the date in the Umbraco backoffice will be `YYYY-MM-DD`, but you can change this to something else. See [MomentJS.com](https://momentjs.com/) for the supported formats.

## Content Example

![Content Example](/files/JwBiPKLB3FlUDmVilqIO)

## MVC View Example - displays a datetime

### Typed

```csharp
@(Model.Content.GetPropertyValue<DateTime>("datePicker").ToString("dd MM yyyy"))
```

### Dynamic (Obsolete)

{% hint style="warning" %}
See [Common pitfalls](/umbraco-cms/13.latest/reference/common-pitfalls.md) for more information about why the dynamic approach is obsolete.
{% endhint %}

```csharp
@{
    @CurrentPage.datePicker.ToString("dd-MM-yyyy")
}
```


---

# 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.umbraco.com/umbraco-cms/13.latest/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/date.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.
