# How to (easiily) set time period to end of a day

**URL:** <https://discuss.elastic.co/t/how-to-easiily-set-time-period-to-end-of-a-day/318208>\
**Category:** Kibana\
**Created:** [November 4, 2022, 3:48pm UTC](https://discuss.elastic.co/t/how-to-easiily-set-time-period-to-end-of-a-day/318208 "2022-11-04T15:48:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikewillis](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@mikewillis](https://discuss.elastic.co/u/mikewillis)\
**Post date:** [November 4, 2022, 3:48pm UTC](https://discuss.elastic.co/t/how-to-easiily-set-time-period-to-end-of-a-day/318208/1 "2022-11-04T15:48:12Z")

</div>

Kibana 7.17

Very often I want to look at data for a certain day, so I need to set the time period as, E.g. Nov 3, 2022 @ 00:00:00.000 to Nov 3, 2022 @ 23:59:59.999. How can I **easily** do that? The only way I can find to do it is selecting 23:30 from the list of times in the date picker and then manually edit it to 23:59:59.999. Which is cumbersome and increasingly irritating.

With the Kibana 6 date picker it was very easy to set the time period to cover one day with a few clicks. With Kibana 7 it seems like it's impossible short of manually editing and typing things.

---

<div class="post-metadata">

**Author:** ![Marta\_Bondyra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marta_bondyra/32/102122_2.png) [@Marta\_Bondyra](https://discuss.elastic.co/u/Marta_Bondyra)\
**Post date:** [November 14, 2022, 1:50pm UTC](https://discuss.elastic.co/t/how-to-easiily-set-time-period-to-end-of-a-day/318208/2 "2022-11-14T13:50:27Z")

</div>

Hi Mike,

I think a nice solution for you would be to either modify a url to:  
`http://localhost:5601/ntj/app/lens#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-2d%2Fd,to:now-2d%2Fd))`

I am talking about the part: `(from:now-2d%2Fd,to:now-2d%2Fd))` - it will create the timerange from 3 days ago to 2 days ago (modify '2' to change the number of days behind)

 ![Screenshot 2022-11-14 at 14.46.42](https://us1.discourse-cdn.com/elastic/original/3X/9/0/9093312adab5fc902dd77eac0009d5756c9ea99b.png)  
 ![Screenshot 2022-11-14 at 14.46.48](https://us1.discourse-cdn.com/elastic/original/3X/4/3/43e608af1e2f5ef083272b46e7dbef1cedbc7339.png)

If you would prefer to automate it to have an option in a time picker, maybe you could add it in you advanced settings as a time picker option (I've added custom 'the day before yesterday'). Then you can just quickly modify the number of days behind:

 ![Screenshot 2022-11-14 at 14.48.44](https://us1.discourse-cdn.com/elastic/original/3X/3/9/39479d16ee80c7a3e48b664a33d29753755a09f6.png)

 ![Screenshot 2022-11-14 at 14.49.13](https://us1.discourse-cdn.com/elastic/original/3X/2/6/26c7fb81636216876edd963c990b991d51eb0908.png)

---

<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:** [December 12, 2022, 1:51pm UTC](https://discuss.elastic.co/t/how-to-easiily-set-time-period-to-end-of-a-day/318208/3 "2022-12-12T13:51:00Z")

</div>

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