# View Surrounding Documents causes failed to parse date field exception

**URL:** https://discuss.elastic.co/t/view-surrounding-documents-causes-failed-to-parse-date-field-exception/147234
**Category:** Kibana
**Created:** [September 4, 2018, 2:53pm UTC](https://discuss.elastic.co/t/view-surrounding-documents-causes-failed-to-parse-date-field-exception/147234 "2018-09-04T14:53:46Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![w\_batelaan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/w_batelaan/32/35124_2.png) [@w\_batelaan](https://discuss.elastic.co/u/w_batelaan)
#### Post date: [September 4, 2018, 2:53pm UTC](https://discuss.elastic.co/t/view-surrounding-documents-causes-failed-to-parse-date-field-exception/147234/1 "2018-09-04T14:53:47Z")

</div>

Using ES6.4.0; Discover works fine with this index, which has a @timestamp field, which Kibana shows as  
September 4th 2018, 15:41:08.309

So why would View Surrounding Documents not be able to parse the date?  
BTW the mapping for @timestamp is this:  
"@timestamp": {  
"type": "date",  
"format": "dateOptionalTime"  
}

Unable to load documents

Request to Elasticsearch failed: {"error":{"root\_cause":[{"type":"parse\_exception","reason":"failed to parse date field [1535985668309](http://........//app/kibana) with format [dateOptionalTime](http://....//app/kibana)"}],"type":"search\_phase\_execution\_exception","reason":"all shards failed","phase":"can\_match","grouped":true,"failed\_shards":[{"shard":0,"index":"logstash6-2018.01","node":"EDi1wHveRX-MVAQVKm1K4g","reason":{"type":"parse\_exception","reason":"failed to parse date field [1535985668309](http://....//app/kibana) with format [dateOptionalTime](http://....//app/kibana)","caused\_by":{"type":"illegal\_argument\_exception","reason":"Unrecognized chars at the end of [1535985668309](http://....//app/kibana): [8309](http://...//app/kibana)"}}}]},"status":400}

---

<div class="post-metadata">

### Author: ![Bargs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bargs/32/5429_2.png) [@Bargs](https://discuss.elastic.co/u/Bargs)
#### Post date: [September 4, 2018, 7:38pm UTC](https://discuss.elastic.co/t/view-surrounding-documents-causes-failed-to-parse-date-field-exception/147234/2 "2018-09-04T19:38:08Z")

</div>

Hi @w_batelaan, unfortunately this is a bug in 6.4. I just submitted a pull request to fix the issue: [https://github.com/elastic/kibana/pull/22684](https://github.com/elastic/kibana/pull/22684)

If you need to work around it in the meantime, you could update your mapping for that field to use the format `date_optional_time||epoch_millis`.

---

<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: [October 2, 2018, 7:38pm UTC](https://discuss.elastic.co/t/view-surrounding-documents-causes-failed-to-parse-date-field-exception/147234/3 "2018-10-02T19:38:13Z")

</div>

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