# Kibana DateRange

**URL:** https://discuss.elastic.co/t/kibana-daterange/127630
**Category:** Kibana
**Created:** [April 11, 2018, 12:55pm UTC](https://discuss.elastic.co/t/kibana-daterange/127630 "2018-04-11T12:55:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![suikast42](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/suikast42/32/29865_2.png) [@suikast42](https://discuss.elastic.co/u/suikast42)
#### Post date: [April 11, 2018, 12:55pm UTC](https://discuss.elastic.co/t/kibana-daterange/127630/1 "2018-04-11T12:55:08Z")

</div>

Hello,

I want to create a bar chart with three date ranges.

0h - 8h  
8h - 16h  
16h - 24h

The range should bound to the beginning date of the timefilter. But the parameter 'now' calculates only the current date as I can see.

For my purpose I add a second field for my mapping that stores only the time withe the timeformat HH:mm:ss.SSS. But Kibana does not accept the ranges .

 ![KibanaDateRange](https://us1.discourse-cdn.com/elastic/original/3X/0/6/06ac7ed2a08242a5859dd45e9246e860c5711bf7.png)

---

<div class="post-metadata">

### Author: ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)
#### Post date: [April 11, 2018, 5:40pm UTC](https://discuss.elastic.co/t/kibana-daterange/127630/2 "2018-04-11T17:40:12Z")

</div>

@suikast42 you can extract the hour of the day into a Float/Integer and use that Field with the Range aggregation. The Date Range aggregation only works with full DateTimes, not with only hours of the day.

---

<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: [May 9, 2018, 5:40pm UTC](https://discuss.elastic.co/t/kibana-daterange/127630/3 "2018-05-09T17:40:27Z")

</div>

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