# Failed to parse date field with query validator

**URL:** <https://discuss.elastic.co/t/failed-to-parse-date-field-with-query-validator/97487>\
**Category:** Elasticsearch\
**Created:** [August 17, 2017, 9:07pm UTC](https://discuss.elastic.co/t/failed-to-parse-date-field-with-query-validator/97487 "2017-08-17T21:07:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![telebh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/telebh/32/42272_2.png) [@telebh](https://discuss.elastic.co/u/telebh)\
**Post date:** [August 17, 2017, 9:07pm UTC](https://discuss.elastic.co/t/failed-to-parse-date-field-with-query-validator/97487/1 "2017-08-17T21:07:15Z")

</div>

Hi there,

I am trying to validate ELasticsearch query for a date field, but it fails raising error as follows

\<\<  
localhost:8020/myindex/\_validate/query?explain

{  
"query":  
{  
"term":  
{  
"docproperties.esindextime": "2015-07-25T18:06:08.000001Z"  
}  
}

}

> >

\<\<  
{  
"valid": false,  
"\_shards": {  
"total": 1,  
"successful": 1,  
"failed": 0  
},  
"explanations": [  
{  
"index": "myindex",  
"valid": false,  
"error": "[myindex/b0Crwg2bQHq16daNWmFDIg] QueryShardException[failed to create query: {\n "term" : {\n "docproperties.esindextime" : {\n "value" : "2015-07-25T18:06:08.000001Z",\n "boost" : 1.0\n }\n }\n}]; nested: ElasticsearchParseException[failed to parse date field [2015-07-25T18:06:08.000001Z] with format [yyyy-MM-dd'T'HH:mm:ss:SSS'Z']]; nested: IllegalArgumentException[Parse failure at index [19] of [2015-07-25T18:06:08.000001Z]];; ElasticsearchParseException[failed to parse date field [2015-07-25T18:06:08.000001Z] with format [yyyy-MM-dd'T'HH:mm:ss:SSS'Z']]; nested: IllegalArgumentException[Parse failure at index [19] of [2015-07-25T18:06:08.000001Z]];; java.lang.IllegalArgumentException: Parse failure at index [19] of [2015-07-25T18:06:08.000001Z]"  
}  
]  
}

> >

---

<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:** [September 14, 2017, 9:07pm UTC](https://discuss.elastic.co/t/failed-to-parse-date-field-with-query-validator/97487/2 "2017-09-14T21:07:15Z")

</div>

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