# 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](https://3872888104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgEH4FChbCn7eDDqREvdE%2Fuploads%2Fgit-blob-c0c5dfb8d605562cf251c63c6a6710cf66db10b2%2FDateTime-DataType.png?alt=media)

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](https://3872888104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgEH4FChbCn7eDDqREvdE%2Fuploads%2Fgit-blob-1ebdd54aaaabd65df5aadf81ac0d1155db2b5d88%2FDate-Time-Content.png?alt=media)

## 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](https://docs.umbraco.com/umbraco-cms/13.latest/reference/common-pitfalls) for more information about why the dynamic approach is obsolete.
{% endhint %}

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