# How do I create a date field from a nested date field?

**URL:** <https://discuss.elastic.co/t/how-do-i-create-a-date-field-from-a-nested-date-field/217580>\
**Category:** Kibana\
**Created:** [February 3, 2020, 9:02am UTC](https://discuss.elastic.co/t/how-do-i-create-a-date-field-from-a-nested-date-field/217580 "2020-02-03T09:02:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeroen2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeroen2/32/55694_2.png) [@Jeroen2](https://discuss.elastic.co/u/Jeroen2)\
**Post date:** [February 3, 2020, 9:02am UTC](https://discuss.elastic.co/t/how-do-i-create-a-date-field-from-a-nested-date-field/217580/1 "2020-02-03T09:02:35Z")

</div>

Let's say my mappings look like this.

```
{
    "index_patterns" : ["ftp-status-dev-*"],
    "mapping": {
      "properties": {
        "context": {
          "properties": {
            "created_at" : {
              "type" : "date",
              "format" : "epoch_second"
            },

            "productCount": {
              "type": "long"
            }
          }
        }
      }
    }
  }

```

When I try to create the index in Kibana I don't get the option to set it as a date field. Is this different when using nested fields or is something else going wrong?

---

<div class="post-metadata">

**Author:** ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)\
**Post date:** [February 3, 2020, 4:31pm UTC](https://discuss.elastic.co/t/how-do-i-create-a-date-field-from-a-nested-date-field/217580/2 "2020-02-03T16:31:46Z")

</div>

This mapping looks like something Kibana can handle. This isn't a `nested` mapping, but an object mapping. Do you have a sample document?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 2, 2020, 4:32pm UTC](https://discuss.elastic.co/t/how-do-i-create-a-date-field-from-a-nested-date-field/217580/3 "2020-03-02T16:32:04Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
