# Failed to parse date format

**URL:** https://discuss.elastic.co/t/failed-to-parse-date-format/188069
**Category:** Elasticsearch
**Created:** [June 28, 2019, 3:01pm UTC](https://discuss.elastic.co/t/failed-to-parse-date-format/188069 "2019-06-28T15:01:11Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Facundo\_Chambo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/facundo_chambo/32/48550_2.png) [@Facundo\_Chambo](https://discuss.elastic.co/u/Facundo_Chambo)
#### Post date: [June 28, 2019, 3:01pm UTC](https://discuss.elastic.co/t/failed-to-parse-date-format/188069/1 "2019-06-28T15:01:11Z")

</div>

Hi,

I'm having this error when I add a Time Filter in Kibana Canvas.

```
[essql] > Unexpected error from Elasticsearch: [parse_exception] failed to parse date field [2019-06-27T14:55:01.165Z] with format [yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis||yyyy-MM-dd'T'HH:mm:ss.SSSZ||basic_date_time]: [failed to parse date field [2019-06-27T14:55:01.165Z] with format [yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis||yyyy-MM-dd'T'HH:mm:ss.SSSZ||basic_date_time]]

```

Why `2019-06-27T14:55:01.165Z` doesn't match `yyyy-MM-dd'T'HH:mm:ss.SSSZ`?

Which should be the correct format?

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [July 1, 2019, 9:24am UTC](https://discuss.elastic.co/t/failed-to-parse-date-format/188069/2 "2019-07-01T09:24:58Z")

</div>

which Elasticsearch version are you using? Can you try `yyyy-MM-dd'T'HH:mm:ss.SSSX`? Note that formats have changed due to the switch to java time away from joda time in Elasticsearch 7.0 and above.

--Alex

---

<div class="post-metadata">

### Author: ![AdrianSanchezLopez](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@AdrianSanchezLopez](https://discuss.elastic.co/u/AdrianSanchezLopez)
#### Post date: [July 2, 2019, 5:42pm UTC](https://discuss.elastic.co/t/failed-to-parse-date-format/188069/3 "2019-07-02T17:42:32Z")

</div>

> [@spinscale](#):
>
> yyyy-MM-dd'T'HH:mm:ss.SSSX

I'm having the same problem, and using this format on the index template does not help

---

<div class="post-metadata">

### Author: ![searchtool](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@searchtool](https://discuss.elastic.co/u/searchtool)
#### Post date: [July 2, 2019, 6:27pm UTC](https://discuss.elastic.co/t/failed-to-parse-date-format/188069/4 "2019-07-02T18:27:21Z")

</div>

Got it too with my Sylog -\> Logstash -\> Elastic setup, as far i can see its since my upgrade from 7.1.0 to 7.2(entire stack)

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [July 3, 2019, 8:21am UTC](https://discuss.elastic.co/t/failed-to-parse-date-format/188069/5 "2019-07-03T08:21:31Z")

</div>

can you provide a full reproducible example instead of just snippets? index creation including mapping, document indexing and querying?

Thanks!

---

<div class="post-metadata">

### Author: ![Facundo\_Chambo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/facundo_chambo/32/48550_2.png) [@Facundo\_Chambo](https://discuss.elastic.co/u/Facundo_Chambo)
#### Post date: [July 4, 2019, 12:26pm UTC](https://discuss.elastic.co/t/failed-to-parse-date-format/188069/6 "2019-07-04T12:26:32Z")

</div>

Thank you @spinscale! It worked!

---

<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: [August 1, 2019, 12:26pm UTC](https://discuss.elastic.co/t/failed-to-parse-date-format/188069/7 "2019-08-01T12:26:33Z")

</div>

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