# Data aggregation

**URL:** <https://discuss.elastic.co/t/data-aggregation/235524>\
**Category:** Kibana\
**Created:** [June 3, 2020, 10:55am UTC](https://discuss.elastic.co/t/data-aggregation/235524 "2020-06-03T10:55:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pranavchauhan0110](https://avatars.discourse-cdn.com/v4/letter/p/59ef9b/32.png) [@pranavchauhan0110](https://discuss.elastic.co/u/pranavchauhan0110)\
**Post date:** [June 3, 2020, 10:55am UTC](https://discuss.elastic.co/t/data-aggregation/235524/1 "2020-06-03T10:55:18Z")

</div>

Hi,  
I want to extract data from an index based on contactDateTime property which is : "type": "date", format": "YYYY-MM-DD HH:mm:ss ZZ". What I want in the data is to filter the matching data between two specified time when we fix a day.  
For example: If we specify date as 2020-06-03 and we want the data recorded between 3pm-5pm. Then the filter should return the relevant results.  
Please help with the query part.  
What two queries should be there to acheive this result?  
I am not able to design a query for it.

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [June 3, 2020, 1:58pm UTC](https://discuss.elastic.co/t/data-aggregation/235524/2 "2020-06-03T13:58:52Z")

</div>

Use the Kibana time picker to specify the date and time range. Then you can use inspector to view the query sent to elasticsearch.

 ![Screen Shot 2020-06-03 at 7.57.52 AM](https://us1.discourse-cdn.com/elastic/original/3X/5/c/5cb270bc6a2edb90678c7b8d4b026f5a98cac34b.png)

 ![Screen Shot 2020-06-03 at 7.58.23 AM](https://us1.discourse-cdn.com/elastic/original/3X/7/d/7d1c72b4aecf1bae78c21ee1ebd3b687b9c05c45.png)

---

<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 1, 2020, 1:59pm UTC](https://discuss.elastic.co/t/data-aggregation/235524/3 "2020-07-01T13:59:05Z")

</div>

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