# Visualize: bucket aggregation on date histogram: click on charts to set a filter makes an error

**URL:** <https://discuss.elastic.co/t/visualize-bucket-aggregation-on-date-histogram-click-on-charts-to-set-a-filter-makes-an-error/43674>\
**Category:** Kibana\
**Created:** [March 7, 2016, 3:53pm UTC](https://discuss.elastic.co/t/visualize-bucket-aggregation-on-date-histogram-click-on-charts-to-set-a-filter-makes-an-error/43674 "2016-03-07T15:53:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![christophe\_spielmann](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christophe_spielmann/32/49567_2.png) [@christophe\_spielmann](https://discuss.elastic.co/u/christophe_spielmann)\
**Post date:** [March 7, 2016, 3:53pm UTC](https://discuss.elastic.co/t/visualize-bucket-aggregation-on-date-histogram-click-on-charts-to-set-a-filter-makes-an-error/43674/1 "2016-03-07T15:53:24Z")

</div>

Kibana 4.2.0 / ES 2.0.0

Visualize tab -\> histogram:  
Y-Axis : count  
Buckets - Split chart  
date histogram ( on a usual date field)  
Interval: yearly.

-\> display is very fine, but when I click on a chart to set up a filter I got the following error.  
Why is the display fine but the date of the filter fails

Error: Request to Elasticsearch failed: {"error":{"root\_cause":[{"type":"parse\_exception","reason":"failed to parse date field [1325372400000] with format [dd-MMM-yyyy HH:mm:ss]"}],"type":"search\_phase\_execution\_exception","reason":"all shards failed","phase":"query","grouped":true,"failed\_shards":[{"shard":0,"index":"kibana\_samplewithparticipant","node":"RBGZvMDbQhaZbxY8oYDvvQ","reason":{"type":"parse\_exception","reason":"failed to parse date field [1325372400000] with format [dd-MMM-yyyy HH:mm:ss]","caused\_by":{"type":"illegal\_argument\_exception","reason":"Invalid format: "1325372400000" is malformed at "25372400000""}}}]}}  
at [http://xxx:5601/bundles/kibana.bundle.js:86524:39](http://xxx:5601/bundles/kibana.bundle.js:86524:39)  
at Function.Promise.try ([http://xxx:5601/bundles/commons.bundle.js:56927:23](http://xxx:5601/bundles/commons.bundle.js:56927:23))  
at [http://xxxx:5601/bundles/commons.bundle.js:56896:31](http://xxxx:5601/bundles/commons.bundle.js:56896:31)  
at Array.map (native)  
at Function.Promise.map ([http://xxxx:5601/bundles/commons.bundle.js:56895:31](http://xxxx:5601/bundles/commons.bundle.js:56895:31))  
at callResponseHandlers ([http://xxxx:5601/bundles/kibana.bundle.js:86496:23](http://xxxx:5601/bundles/kibana.bundle.js:86496:23))  
at [http://xxxx:5601/bundles/kibana.bundle.js:86020:17](http://xxxx:5601/bundles/kibana.bundle.js:86020:17)  
at wrappedCallback ([http://xxxx:5601/bundles/commons.bundle.js:38613:82](http://xxxx:5601/bundles/commons.bundle.js:38613:82))  
at wrappedCallback ([http://xxxx:5601/bundles/commons.bundle.js:38613:82](http://xxxx:5601/bundles/commons.bundle.js:38613:82))  
at [http://xxxx:5601/bundles/commons.bundle.js:38699:27](http://xxxx:5601/bundles/commons.bundle.js:38699:27)

my mapping is:  
....  
{  
"sample\_audit\_date": {  
"path\_match": "audits.((?!Collection).\*).date",  
"match\_pattern": "regex",  
"mapping": {  
"type": "date",  
"format": "dd-MMM-yyyy HH:mm:ss",  
"ignore\_malformed": "true",  
"doc\_values": true  
}  
}},  
....

I am not able yet to find any rationale around that.

---

<div class="post-metadata">

**Author:** ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)\
**Post date:** [March 8, 2016, 12:14am UTC](https://discuss.elastic.co/t/visualize-bucket-aggregation-on-date-histogram-click-on-charts-to-set-a-filter-makes-an-error/43674/2 "2016-03-08T00:14:12Z")

</div>

There's definitely something wrong there with the timestamp being passed into that query. `1325372400000` isn't a valid epoch time, it looks like a Javascript time (which is essentially epoch \* 1000).

Have you tried running a newer version of 4.2 ([4.2.2 is the most recent 4.2 version](https://www.elastic.co/downloads/past-releases/kibana-4-2.2)) to see if this issue still exists there? I did a quick search to find that error in the issue list, and didn't find it, but it may very well be that my cursory look was not enough.

---

<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:** [July 6, 2017, 1:59pm UTC](https://discuss.elastic.co/t/visualize-bucket-aggregation-on-date-histogram-click-on-charts-to-set-a-filter-makes-an-error/43674/3 "2017-07-06T13:59:58Z")

</div>


