# Date Range aggregation on date\_range field

**URL:** https://discuss.elastic.co/t/date-range-aggregation-on-date-range-field/91675
**Category:** Elasticsearch
**Created:** [July 3, 2017, 4:28pm UTC](https://discuss.elastic.co/t/date-range-aggregation-on-date-range-field/91675 "2017-07-03T16:28:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Kiran\_Kumar\_Reddy\_Sa](https://avatars.discourse-cdn.com/v4/letter/k/a587f6/32.png) [@Kiran\_Kumar\_Reddy\_Sa](https://discuss.elastic.co/u/Kiran_Kumar_Reddy_Sa)
#### Post date: [July 3, 2017, 4:28pm UTC](https://discuss.elastic.co/t/date-range-aggregation-on-date-range-field/91675/1 "2017-07-03T16:28:14Z")

</div>

I have a set of documents with date range. I want to get schedule with in specific duration.

For example, following are 2 events.

1. Event 1 - from 10th to 20th
2. Event 2 - from 15th to 25th

Get schedule from 1st to 30th. Expecting following output.

1. Date 10th to 14th - Event 1
2. Date 15th to 20th - Event 1 and Event 2
3. Date 21st to 25th - Event 2

Please suggest how can i achieve this.

---

<div class="post-metadata">

### Author: ![colings86](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colings86/32/44960_2.png) [@colings86](https://discuss.elastic.co/u/colings86)
#### Post date: [July 3, 2017, 5:03pm UTC](https://discuss.elastic.co/t/date-range-aggregation-on-date-range-field/91675/2 "2017-07-03T17:03:52Z")

</div>

Currently there are no aggregations that work on range fields. There is an issue open to add this which you can track here: [https://github.com/elastic/elasticsearch/issues/23182](https://github.com/elastic/elasticsearch/issues/23182)

---

<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 31, 2017, 5:04pm UTC](https://discuss.elastic.co/t/date-range-aggregation-on-date-range-field/91675/3 "2017-07-31T17:04:16Z")

</div>

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