# Custom time filter

**URL:** <https://discuss.elastic.co/t/custom-time-filter/1792>\
**Category:** Kibana\
**Created:** [June 3, 2015, 3:48am UTC](https://discuss.elastic.co/t/custom-time-filter/1792 "2015-06-03T03:48:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anoban](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anoban/32/3466_2.png) [@anoban](https://discuss.elastic.co/u/anoban)\
**Post date:** [June 3, 2015, 3:48am UTC](https://discuss.elastic.co/t/custom-time-filter/1792/1 "2015-06-03T03:48:43Z")

</div>

Is it on the cards to be able to create custom time filters. For example I'd like to monitor services in a region for which a "day" means 8:30am - 6:30pm

Another region would be 8.30am - 4.30 am the next day.

Can that be shown somehow?

---

<div class="post-metadata">

**Author:** ![eperry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eperry/32/551_2.png) [@eperry](https://discuss.elastic.co/u/eperry)\
**Post date:** [June 13, 2015, 2:00pm UTC](https://discuss.elastic.co/t/custom-time-filter/1792/2 "2015-06-13T14:00:22Z")

</div>

Yes you can create date filters, and since Elasticsearch works in GMT you just have to create a filter based on the GMT Time you want

Check this out  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-filter.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-filter.html)  
You can also do things like "date-1h/h"

{  
"constant\_score": {  
"filter": {  
"range" : {  
"born" : {  
"gte": "2012-01-01",  
"lte": "now",  
"time\_zone": "+1:00"  
}  
}  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![anoban](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anoban/32/3466_2.png) [@anoban](https://discuss.elastic.co/u/anoban)\
**Post date:** [June 17, 2015, 2:05am UTC](https://discuss.elastic.co/t/custom-time-filter/1792/3 "2015-06-17T02:05:07Z")

</div>

I mean in Kibana. I want to have my users be able to click on something that I can set up in the background.

---

<div class="post-metadata">

**Author:** ![eperry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eperry/32/551_2.png) [@eperry](https://discuss.elastic.co/u/eperry)\
**Post date:** [June 17, 2015, 3:42am UTC](https://discuss.elastic.co/t/custom-time-filter/1792/4 "2015-06-17T03:42:35Z")

</div>

Well in Kibana, you can set custome time's in the upper right corner and the way I handle is just build a Markdown Widget that links to the "Dashboard/search with the time frame included.

Example of a Dashboard link  
This is what I have for a link  
**[http://dashboard.digital.hbc.com/DSG/kibana/#/dashboard/DSG-SAR-All?\_g=(time:(from:now-4h,mode:quick,to:now)](http://dashboard.digital.hbc.com/DSG/kibana/#/dashboard/DSG-SAR-All?_g=(time:(from:now-4h,mode:quick,to:now)))**

Which is subset of this URL page (when loading the dashboard in kibana) Obviously you would change your URL to relect the timeframe you wanted.

**[http://dashboard.digital.hbc.com/DSG/kibana/#/dashboard/DSG-SAR-All?\_g=(time:(from:now-4h,mode:quick,to:now)](http://dashboard.digital.hbc.com/DSG/kibana/#/dashboard/DSG-SAR-All?_g=(time:(from:now-4h,mode:quick,to:now)))**&\_a=(filters:!(),panels:!((col:1,id:DSG-SAR-PCPU,row:5,size\_x:7,size\_y:3,type:visualization),(col:8,id:DSG-SAR-PIDLE,row:1,size\_x:5,size\_y:4,type:visualization),(col:8,id:DSG-SAR-PIOWAIT,row:5,size\_x:5,size\_y:4,type:visualization),(col:1,id:DSG-SAR-PSYSTEM,row:8,size\_x:7,size\_y:4,type:visualization),(col:1,id:DSG-SAR-PUSER,row:1,size\_x:7,size\_y:4,type:visualization)),query:(query\_string:(analyze\_wildcard:!t,query:'\*')),title:'DSG%20-%20SAR%20All')

---

<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:18pm UTC](https://discuss.elastic.co/t/custom-time-filter/1792/5 "2017-07-06T14:18:05Z")

</div>


