# Saved field "engines.time" is invalid for use with the "Date Histogram" aggregation. Please select a new field

**URL:** <https://discuss.elastic.co/t/saved-field-engines-time-is-invalid-for-use-with-the-date-histogram-aggregation-please-select-a-new-field/263160>\
**Category:** Elasticsearch\
**Created:** [February 3, 2021, 6:26pm UTC](https://discuss.elastic.co/t/saved-field-engines-time-is-invalid-for-use-with-the-date-histogram-aggregation-please-select-a-new-field/263160 "2021-02-03T18:26:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ankit4](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankit4/32/78031_2.png) [@Ankit4](https://discuss.elastic.co/u/Ankit4)\
**Post date:** [February 3, 2021, 6:26pm UTC](https://discuss.elastic.co/t/saved-field-engines-time-is-invalid-for-use-with-the-date-histogram-aggregation-please-select-a-new-field/263160/1 "2021-02-03T18:26:42Z")

</div>

I am getting this error, while creating index pattern in kibana;

```auto
Error: Saved field "engines.time" is invalid for use with the "Date Histogram" aggregation. Please select a new field.
    at FieldParamType._this.deserialize (http://52.36.239.31:5601/36063/bundles/plugin/data/data.plugin.js:1:749585)
    at http://52.36.239.31:5601/36063/bundles/plugin/data/data.plugin.js:1:500490
    at Array.forEach (<anonymous>)
    at AggConfig.setParams (http://52.36.239.31:5601/36063/bundles/plugin/data/data.plugin.js:1:499912)
    at AggConfig.set (http://52.36.239.31:5601/36063/bundles/plugin/data/data.plugin.js:1:506846)
    at AggConfig.setType (http://52.36.239.31:5601/36063/bundles/plugin/data/data.plugin.js:1:506209)
    at new AggConfig (http://52.36.239.31:5601/36063/bundles/plugin/data/data.plugin.js:1:499641)
    at AggConfigs.createAggConfig (http://52.36.239.31:5601/36063/bundles/plugin/data/data.plugin.js:1:258575)
    at http://52.36.239.31:5601/36063/bundles/plugin/data/data.plugin.js:1:258964
    at Array.forEach (<anonymous>)

```

The index mapping we created is;

```auto
    PUT dashboard
    {
      "settings": {
        "number_of_shards": 2
        ,"number_of_replicas": 1
      },
      "mappings": {
        "properties": {
          "engines":{
            "type": "nested",
            "properties": {
              "time":{
                "type": "date",
                "format": "yyyy-MM-dd HH:mm:ss.SSS"
              },
              "cause":{
                "type": "text"
              }
            }
          }
        }
      }
    } 

```

The time format we are trying to parse is; for ex. 2020-08-12 15:35:45.302

---

<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 3, 2021, 6:27pm UTC](https://discuss.elastic.co/t/saved-field-engines-time-is-invalid-for-use-with-the-date-histogram-aggregation-please-select-a-new-field/263160/2 "2021-03-03T18:27:24Z")

</div>

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