# Time of Day filter

**URL:** https://discuss.elastic.co/t/time-of-day-filter/263277
**Category:** Kibana
**Created:** [February 4, 2021, 6:10pm UTC](https://discuss.elastic.co/t/time-of-day-filter/263277 "2021-02-04T18:10:15Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![stevezemlicka](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@stevezemlicka](https://discuss.elastic.co/u/stevezemlicka)
#### Post date: [February 5, 2021, 11:20pm UTC](https://discuss.elastic.co/t/time-of-day-filter/263277/5 "2021-02-05T23:20:15Z")

</div>

My solution to this ultimately was to create a scripted field that pulled the hour from the @timestamp

> [@Hour Scripted Field](https://discuss.elastic.co/t/hour-scripted-field/263416):
>
> I am trying to create a scripted field that is the hourly value of each document. The ultimate goal is to filter by specific hours of the day for multiple days (hence why I can't just use the date range on the dashboards). After a bit of research, the best resource I found was the following which seems to indicate that this is possible: However I cannot seem to get it to work. When I try to preview the results, I receive the following: doc['@timestamp'].date.hourOfDay produces { "roo…

Then create a control visualization that allowed to select the hours we wanted to include.

---

_[View the full topic](https://discuss.elastic.co/t/time-of-day-filter/263277)._
