# How to use Date Range filter in Kibana?

**URL:** https://discuss.elastic.co/t/how-to-use-date-range-filter-in-kibana/194751
**Category:** Kibana
**Created:** [August 11, 2019, 4:05pm UTC](https://discuss.elastic.co/t/how-to-use-date-range-filter-in-kibana/194751 "2019-08-11T16:05:13Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Sujata\_Yadav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sujata_yadav/32/41882_2.png) [@Sujata\_Yadav](https://discuss.elastic.co/u/Sujata_Yadav)
#### Post date: [August 11, 2019, 4:05pm UTC](https://discuss.elastic.co/t/how-to-use-date-range-filter-in-kibana/194751/1 "2019-08-11T16:05:14Z")

</div>

Hi All,

I am trying to use kibana date filter range to plot a bar chart for my relevant data. I am unable to use the date filter for filtering out a particular range of data.

My date format in JSON is 2019-01-04T03:02:51.000Z. and Table format it's displayed as  
Jan 4, 2019 @ 08:32:51.000.

Does anyone know to apply a date range filter? The official docs are of no use. TIA.

Regards,  
Sujata

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [August 11, 2019, 11:01pm UTC](https://discuss.elastic.co/t/how-to-use-date-range-filter-in-kibana/194751/2 "2019-08-11T23:01:44Z")

</div>

Hi Sujata and thanks for trying Kibana.

Curious what version of Kibana are you using?

I suspect you are getting the error `[strict_date_optional_time||epoch_millis]:`

1st you can apply a date filter by just using the Date Picker over near the top right... and click on Absolute and pick a date range.

 ![03%20PM](https://us1.discourse-cdn.com/elastic/original/3X/2/a/2afde3e0f60fa06194355f2bf234533fe3b98a8c.png)

Or if you want to use the `Add Filter` on the left hand side, the date needs to be in ISO Format (i.e. same as your JSON above) or MilliSeconds from the epoch, perhaps the docs should link to [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/date.html) instead.

 ![24%20PM](https://us1.discourse-cdn.com/elastic/original/3X/c/2/c2e3fe6bee6678620a96c219d1c06e84c97ecc2e.png)

What the `strict_date_optional_time` means is the Date is mandatory but the Time is optional

So valid formats would be

Date and Time  
2019-08-11T14:00:00.000Z

or Date Only  
2019-08-11

One word of caution, your date filter should be a subset of the Date Picker time range in the top right, if you date filter that is outside the time in the Date Picker you will get no results... in essence they are "ANDed" . If you clink on the `Inspect` link you will be the resulting request.

---

<div class="post-metadata">

### Author: ![Sujata\_Yadav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sujata_yadav/32/41882_2.png) [@Sujata\_Yadav](https://discuss.elastic.co/u/Sujata_Yadav)
#### Post date: [August 13, 2019, 6:13am UTC](https://discuss.elastic.co/t/how-to-use-date-range-filter-in-kibana/194751/3 "2019-08-13T06:13:44Z")

</div>

Hi @stephenb,

I am using Kibana 7.1.1. I don't want to filter data on the basis of timestamp. Instead, i want to filter it using the 'Open Date' field present in my index.

This is the data present in my kibana index.

Jan 3, 2019 @ 01:39:15.000 Universal\_Id:SW453611 Open\_Date:Jan 3, 2019 @ 07:09:15.000 Last\_Update: Feb 18, 2019 @ 10:22:05.000

![kibanaquery](https://us1.discourse-cdn.com/elastic/original/3X/d/7/d7f91fcae38969581a6ede4330d42550b20373e3.png)

Can u please help me with using the date filter using 'open date' field present in my kibana index?  
Regards,  
Sujata

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [August 13, 2019, 2:04pm UTC](https://discuss.elastic.co/t/how-to-use-date-range-filter-in-kibana/194751/4 "2019-08-13T14:04:30Z")

</div>

Apologies I missed you were trying with a Bart Chart

but I think the Same Should Apply... Assuming OpenDate stored as a normal `date` field in Elasticsearch. You can check that looking the index pattern and making sure that is of type date.

Then any of the following should work  
From `2019-08-11T13:40:12.762Z` to `2019-08-13T13:40:12.762Z`

Or from `2019-08-11` To `2019-08-12`

Or From : `now-1h` To : `now`

[https://www.elastic.co/guide/en/elasticsearch/reference/7.1/common-options.html#date-math](https://www.elastic.co/guide/en/elasticsearch/reference/7.1/common-options.html#date-math)

---

<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: [September 10, 2019, 2:04pm UTC](https://discuss.elastic.co/t/how-to-use-date-range-filter-in-kibana/194751/5 "2019-09-10T14:04:38Z")

</div>

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