# .NET setting field as Date

**URL:** https://discuss.elastic.co/t/net-setting-field-as-date/126947
**Category:** Elasticsearch
**Created:** [April 5, 2018, 2:13pm UTC](https://discuss.elastic.co/t/net-setting-field-as-date/126947 "2018-04-05T14:13:18Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![Neal\_Walters](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/neal_walters/32/29581_2.png) [@Neal\_Walters](https://discuss.elastic.co/u/Neal_Walters)
#### Post date: [April 6, 2018, 3:20pm UTC](https://discuss.elastic.co/t/net-setting-field-as-date/126947/4 "2018-04-06T15:20:44Z")

</div>

From Kibana - Dev Tools, I ran  
GET local-neal-test-kibananew2c-2018.04.06  
which give sthe following - showing that createdDate is actually a date.

So now back to my original quandry - why can't I sort by it?

> [@How sort by date/time on Kibana Discover](https://discuss.elastic.co/t/how-sort-by-date-time-on-kibana-discover/126804):
>
> Below is an example of what I am seeing: I dont' see the "time" choice as shown in this thread: I'd like to sort by descending date/time ]the field createdDate (even by default if possible). It's one of the fields in every message: [Kibana\_Sort\_Fields] Thanks, Neal

```
> {
> "local-neal-test-kibananew2c-2018.04.06": {
> "aliases": {},
> "mappings": {
> "document2": {
> "properties": {
> "createdDate": {
> "type": "date"
> },
> "message": {
> "type": "text",
> "fields": {
> "keyword": {
> "type": "keyword",
> "ignore_above": 256
> }
> }
> },
> "transactionType": {
> "type": "text",
> "fields": {
> "keyword": {
> "type": "keyword",
> "ignore_above": 256
> }
> }
> }
> }
> }
> },
> "settings": {
> "index": {
> "creation_date": "1523026621059",
> "number_of_shards": "5",
> "number_of_replicas": "1",
> "uuid": "3DzKTpm7TYKk_u35pj3eBA",
> "version": {
> "created": "6000099"
> },
> "provided_name": "local-neal-test-kibananew2c-2018.04.06"
> }
> }
> }
> }

```

---

_[View the full topic](https://discuss.elastic.co/t/net-setting-field-as-date/126947)._
