Restrict specific time range

Hello all, is there any method that I can restrict specific time range? I want to restrict time range from yesterday 12 p.m. to today 12:00 p.m. so that my Kibana dashboard can show the specific time range's data.

Thanks for any reply.

Hi there,

I am not sure what you mean by restrict. If you mean - display only this data, you could use a global timepicker:
image

or create a filter that you can easy switch on and off, but in this case the charts will expand through the whole timepicker data, but only show the data restricted by the filter:


Hello @Marta_Bondyra thanks for your reply.

I know the time filter but what I want is there any method that can create a filter restrict time from 12 noon yesterday to 12 noon today.

No matter when I look at my dashboard, it always show the data from 12 noon yesterday to 12 noon today.

Thanks for your reply again.

Ok, now I understand your problem. I think the easiest would be to directly modify your URL:

https://[nameofthehost]/dashboards#/{...}time:(from:now%2Fd-12h,to:now%2Fd-12h)){...}

The bold part is what you need to use.

The value now%2Fd-12h is an escaped value for now/d-12h.Firstly we round 'now' to a day now/d (which gives us the 00:00:00 today) and then we subtract 12 hours (which gives us noon yesterday). The closing value will give us 23:59:59 today and we get 11:59:59 today after subtraction. If you need something more complicated, take a look at the docs:


Hello @Marta_Bondyra

I am grateful that your method solve my problem. My dashboard shows the specific time range data now.

Thanks your help again!

Glad it worked! Always happy to help! :slight_smile:

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