# Date parsing issue - ElasticSearch 7.6

**URL:** <https://discuss.elastic.co/t/date-parsing-issue-elasticsearch-7-6/229989>\
**Category:** Elasticsearch\
**Created:** [April 27, 2020, 4:33pm UTC](https://discuss.elastic.co/t/date-parsing-issue-elasticsearch-7-6/229989 "2020-04-27T16:33:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![IanCap](https://avatars.discourse-cdn.com/v4/letter/i/74df32/32.png) [@IanCap](https://discuss.elastic.co/u/IanCap)\
**Post date:** [April 27, 2020, 4:33pm UTC](https://discuss.elastic.co/t/date-parsing-issue-elasticsearch-7-6/229989/1 "2020-04-27T16:33:18Z")

</div>

Hi everyone,

I recently migrated from ElasticSearch 6.8 to 7.6 and i have an issue with the date format

I'm pushing documents to ElasticSearch with the following format :

```auto
yyyy-MM-dd'T'HH:mm:ssZ

```

I red the following links (an others) on the best practise and issues :  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/date.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/date.html)  
[https://www.elastic.co/guide/en/elasticsearch/reference/7.x/breaking-changes-7.0.html](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/breaking-changes-7.0.html)

When i try to put new documents to ES, i get the following error :

```auto
Elasticsearch exception [type=illegal_argument_exception, reason=unable to parse date [2020-04-27T15:14:11Z]]]; nested: ElasticsearchException[Elasticsearch exception [type=illegal_argument_exception, reason=failed to parse date field [2020-04-27T15:14:11Z] with format [8yyyy-MM-dd'T'HH:mm:ssZ]]]; nested: ElasticsearchException[Elasticsearch exception [type=date_time_parse_exception, reason=Text '2020-04-27T15:14:11Z' could not be parsed at index 19

```

My current pipeline has the following date format :

```auto
"formats" : ["yyyy-MM-dd'T'HH:mm:ssX", "yyyy-MM-dd'T'HH:mm:ss.SSSX"],

```

I don't specify any date format in the mapping as it didn't work when i tried, but maybe i did it wrong.

What would work with my current configuration ? Any help would be much appreciated,

Thanks in advance !

---

<div class="post-metadata">

**Author:** ![IanCap](https://avatars.discourse-cdn.com/v4/letter/i/74df32/32.png) [@IanCap](https://discuss.elastic.co/u/IanCap)\
**Post date:** [April 28, 2020, 8:22am UTC](https://discuss.elastic.co/t/date-parsing-issue-elasticsearch-7-6/229989/2 "2020-04-28T08:22:13Z")

</div>

Fixed !

The pipeline was the solution, it didn't match the format used in the files. Now it does.  
Closing the issue

---

<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:** [May 26, 2020, 8:22am UTC](https://discuss.elastic.co/t/date-parsing-issue-elasticsearch-7-6/229989/3 "2020-05-26T08:22:15Z")

</div>

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