# Filters aggregation with invalid result on aggregating by date

**URL:** <https://discuss.elastic.co/t/filters-aggregation-with-invalid-result-on-aggregating-by-date/51389>\
**Category:** Elasticsearch\
**Created:** [May 31, 2016, 7:36am UTC](https://discuss.elastic.co/t/filters-aggregation-with-invalid-result-on-aggregating-by-date/51389 "2016-05-31T07:36:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karthik\_Ramachandran](https://avatars.discourse-cdn.com/v4/letter/k/f19dbf/32.png) [@Karthik\_Ramachandran](https://discuss.elastic.co/u/Karthik_Ramachandran)\
**Post date:** [May 31, 2016, 7:36am UTC](https://discuss.elastic.co/t/filters-aggregation-with-invalid-result-on-aggregating-by-date/51389/1 "2016-05-31T07:36:08Z")

</div>

Below I have put my filters aggregation query. But it is giving me invalid result on filtering for a single day using gte/lte

Ex. If I use get and lte as 02/03/2016 and 05/03/2016 it gives me correct summary as 5527915. The actual break up of 2,3,4,5 is 1882846,1848504, 1794313 and 2252

But, if I use 02/02/2016 for gte and 02/02/2016 for let, it gives me 3636. A complete wrong result. My goal is to get the count for single day and I"m not able to achieve it. Any guidance please

{  
"size": 0,  
"aggs": {  
"CustomGroups": {  
"filters": {  
"filters": {  
"Test1": {  
"bool": {  
"filter": [  
{  
"range": {  
"PublishedTimeGMT": {"gte":"02/03/2016","lte":"02/03/2016","format":"dd/MM/yyyy"}  
}  
}  
]  
}  
}  
}  
}  
}  
}  
}

---

<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 5, 2017, 10:47pm UTC](https://discuss.elastic.co/t/filters-aggregation-with-invalid-result-on-aggregating-by-date/51389/2 "2017-07-05T22:47:48Z")

</div>


