# Multiple Date format in mapping fails

**URL:** <https://discuss.elastic.co/t/multiple-date-format-in-mapping-fails/272616>\
**Category:** Elasticsearch\
**Created:** [May 10, 2021, 10:14pm UTC](https://discuss.elastic.co/t/multiple-date-format-in-mapping-fails/272616 "2021-05-10T22:14:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sandeep\_Raju](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@Sandeep\_Raju](https://discuss.elastic.co/u/Sandeep_Raju)\
**Post date:** [May 10, 2021, 10:14pm UTC](https://discuss.elastic.co/t/multiple-date-format-in-mapping-fails/272616/1 "2021-05-10T22:14:01Z")

</div>

Hi all,

There is provision for multiple date format in elasticsearch.

But whenever I try my multiple date format in console, it fails to parse and no data is displayed.

```auto
PUT brs_total
{
  "mappings": {
    "properties": {
      "STATEMENT_DATE": {
        "type": "date",
        "format": "epoch_millis||epoch_second"
      },
        "Account_Number_Type" : {
          "type" : "keyword"
        },
        "DC_AMOUNT" : {
          "type" : "double"
        }
    }
  }
}

```

I want to reindex many indices with different date format into this index.  
But the data is not visible in discover.I can see correct document count in Index mgmt tab  
Any idea why this is happening?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 10, 2021, 11:22pm UTC](https://discuss.elastic.co/t/multiple-date-format-in-mapping-fails/272616/2 "2021-05-10T23:22:08Z")

</div>

> [@Sandeep\_Raju](#):
>
> But whenever I try my multiple date format in console, it fails to parse and no data is displayed.

I just tried the example you posted, thanks for providing it, and it worked. If you have something that doesn't work then it'd be useful to see.

---

<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:** [June 7, 2021, 11:22pm UTC](https://discuss.elastic.co/t/multiple-date-format-in-mapping-fails/272616/3 "2021-06-07T23:22:27Z")

</div>

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