# Restrict specific time range

**URL:** https://discuss.elastic.co/t/restrict-specific-time-range/261496
**Category:** Kibana
**Created:** [January 19, 2021, 6:31am UTC](https://discuss.elastic.co/t/restrict-specific-time-range/261496 "2021-01-19T06:31:32Z")
**Posts on this page:** 1
**Showing post:** 4

<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: [January 20, 2021, 8:18am UTC](https://discuss.elastic.co/t/restrict-specific-time-range/261496/4 "2021-01-20T08:18:10Z")

</div>

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:

> **[Range query | Elasticsearch Reference \[7.6\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.6/query-dsl-range-query.html#range-query-date-math-rounding)**

  

> **[Common options | Elasticsearch Reference \[7.6\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.6/common-options.html#date-math)**

---

_[View the full topic](https://discuss.elastic.co/t/restrict-specific-time-range/261496)._
