# Time based search in Kibana discover or visualize

**URL:** <https://discuss.elastic.co/t/time-based-search-in-kibana-discover-or-visualize/35274>\
**Category:** Kibana\
**Created:** [November 23, 2015, 7:10am UTC](https://discuss.elastic.co/t/time-based-search-in-kibana-discover-or-visualize/35274 "2015-11-23T07:10:36Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![chinmoyd](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@chinmoyd](https://discuss.elastic.co/u/chinmoyd)\
**Post date:** [November 23, 2015, 7:10am UTC](https://discuss.elastic.co/t/time-based-search-in-kibana-discover-or-visualize/35274/1 "2015-11-23T07:10:37Z")

</div>

I have a time stamp field ( name is timestamp ) in my list of fields in Kibana index. I need to set a filter as below:  
Display all the transactions between 2015-11-23 10:11:23 and 2015-11-23 10:50:33

Please suggest what filter do I need to set in Kibana while designing my Search in discover tab

Regards,  
Chinmoy das

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 24, 2015, 3:53am UTC](https://discuss.elastic.co/t/time-based-search-in-kibana-discover-or-visualize/35274/2 "2015-11-24T03:53:51Z")

</div>

Are you setting the time field in the index settings as the one in the in the doc you want to filter on?

---

<div class="post-metadata">

**Author:** ![chinmoyd](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@chinmoyd](https://discuss.elastic.co/u/chinmoyd)\
**Post date:** [November 24, 2015, 4:14am UTC](https://discuss.elastic.co/t/time-based-search-in-kibana-discover-or-visualize/35274/3 "2015-11-24T04:14:19Z")

</div>

My use case is as below:  
I am logging payment transaction data with the details as transaction id, amount, bank, status, timestamp. I have not specified and special setting for the timestamp field while creating the index. I need to filter the records based on a timestamp range. I could find some example where filtering is done by date, but could not trace anything for timestamp. Please suggest how this is possible to filter using timestamp using Kibana.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 25, 2015, 6:53am UTC](https://discuss.elastic.co/t/time-based-search-in-kibana-discover-or-visualize/35274/4 "2015-11-25T06:53:54Z")

</div>

When you create the index pattern in KB, make sure you set the timestamp field to be the one in the document.  
Then it'll be simple.

---

<div class="post-metadata">

**Author:** ![chinmoyd](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@chinmoyd](https://discuss.elastic.co/u/chinmoyd)\
**Post date:** [November 25, 2015, 12:43pm UTC](https://discuss.elastic.co/t/time-based-search-in-kibana-discover-or-visualize/35274/5 "2015-11-25T12:43:58Z")

</div>

The timestamp field is in the index. Can you please share the syntax of the query filter that I need to add in Kibana Discover? I am trying like timestamp: {2015-11-04 11:12:13 TO 2015-11-04 11:20:20}. But that is not working

---

<div class="post-metadata">

**Author:** ![chinmoyd](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@chinmoyd](https://discuss.elastic.co/u/chinmoyd)\
**Post date:** [November 26, 2015, 9:53am UTC](https://discuss.elastic.co/t/time-based-search-in-kibana-discover-or-visualize/35274/6 "2015-11-26T09:53:03Z")

</div>

Any pointer to the search syntax will be helpful.

---

<div class="post-metadata">

**Author:** ![Pieter\_Agenbag](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pieter_agenbag/32/4562_2.png) [@Pieter\_Agenbag](https://discuss.elastic.co/u/Pieter_Agenbag)\
**Post date:** [November 26, 2015, 3:36pm UTC](https://discuss.elastic.co/t/time-based-search-in-kibana-discover-or-visualize/35274/7 "2015-11-26T15:36:45Z")

</div>

just use `timestamp: ["2015-11-04T11:12:13" TO "2015-11-04T11:20:20"]` .

But as @warkolm said, you should be specifying your index (in kibana settings) as a timestamped index.

 ![](https://us1.discourse-cdn.com/elastic/original/2X/3/3f809d045f0b6602353138708c584bf86b25b6f5.png)  
Then you'll have a histogram at the top of the discover page and you can simply scrub the graph to filter on a timerange.

 ![](https://us1.discourse-cdn.com/elastic/original/2X/3/3967cf0688b6ec2724527a7d19fa069e0f62cafb.png)  
And there will also be a "time selector" in the toolbar.

 ![](https://us1.discourse-cdn.com/elastic/original/2X/f/f8b37ff2967b8c803da4a12a0c5aae43bc68ebac.png)

---

<div class="post-metadata">

**Author:** ![chinmoyd](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@chinmoyd](https://discuss.elastic.co/u/chinmoyd)\
**Post date:** [November 27, 2015, 5:56pm UTC](https://discuss.elastic.co/t/time-based-search-in-kibana-discover-or-visualize/35274/8 "2015-11-27T17:56:05Z")

</div>

Thanks a lot Pieter

---

<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 6, 2017, 2:08pm UTC](https://discuss.elastic.co/t/time-based-search-in-kibana-discover-or-visualize/35274/9 "2017-07-06T14:08:02Z")

</div>


