# Filter for Time Range

**URL:** https://discuss.elastic.co/t/filter-for-time-range/203812
**Category:** Kibana
**Created:** [October 16, 2019, 10:42am UTC](https://discuss.elastic.co/t/filter-for-time-range/203812 "2019-10-16T10:42:00Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Chris4](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Chris4](https://discuss.elastic.co/u/Chris4)
#### Post date: [October 16, 2019, 10:42am UTC](https://discuss.elastic.co/t/filter-for-time-range/203812/1 "2019-10-16T10:42:00Z")

</div>

How can i filter for certain time ranges which are not using a fixed date ?  
e.g.

22:00 yesterday - 06:00 today  
06:00 today - 14:00 today  
14:00 today - 22:00 today

is there something like a universal date-format which is not fixing the date?

![grafik](https://us1.discourse-cdn.com/elastic/original/3X/b/5/b565be59c2cefe6ed1669d7fd0cb620eee87971a.png)

---

<div class="post-metadata">

### Author: ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)
#### Post date: [October 17, 2019, 8:49pm UTC](https://discuss.elastic.co/t/filter-for-time-range/203812/2 "2019-10-17T20:49:32Z")

</div>

Actually, yeah, the link there should have some examples on how to accomplish this.

Should be something like this:

22:00 yesterday - 06:00 today: `now/d-2h` to `now/d+6h` (not sure if that's exactly correct but something along those lines).

The `/d` means "rounded to the nearest day" and the `-2h` means "minus 2 hours".

---

<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: [November 14, 2019, 8:49pm UTC](https://discuss.elastic.co/t/filter-for-time-range/203812/3 "2019-11-14T20:49:34Z")

</div>

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