# Controlling time range using the URL

**URL:** <https://community.grafana.com/t/controlling-time-range-using-the-url/69313>\
**Category:** Dashboards\
**Tags:** api\
**Created:** [July 25, 2022, 8:58am UTC](https://community.grafana.com/t/controlling-time-range-using-the-url/69313 "2022-07-25T08:58:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dudicoco](https://avatars.discourse-cdn.com/v4/letter/d/8797f3/32.png) [@dudicoco](https://community.grafana.com/u/dudicoco)\
**Post date:** [July 25, 2022, 8:58am UTC](https://community.grafana.com/t/controlling-time-range-using-the-url/69313/1 "2022-07-25T08:58:01Z")

</div>

Hi,

I’m trying to add a link to a dashboard URL from Prometheus Alertmanager notification template and i’m running into a couple of issues:

1. The `time` query parameter as documented in [Manage dashboard links | Grafana documentation](https://grafana.com/docs/grafana/next/dashboards/manage-dashboard-links/#controlling-time-range-using-the-url) does not work - adding `?time=1500000000000&time.window=10000` to the URL does nothing.
2. Even if I could get the `time` query parameter to work, I need a way to convert the Alertmanager `StartsAt` time format to the ms epoch format: [Notification template reference | Prometheus](https://prometheus.io/docs/alerting/latest/notifications/#alert)

Any suggestions?

---

<div class="post-metadata">

**Author:** ![dudicoco](https://avatars.discourse-cdn.com/v4/letter/d/8797f3/32.png) [@dudicoco](https://community.grafana.com/u/dudicoco)\
**Post date:** [July 25, 2022, 8:59am UTC](https://community.grafana.com/t/controlling-time-range-using-the-url/69313/2 "2022-07-25T08:59:06Z")

</div>

See example of the time range not working: [Grafana](https://play.grafana.org/d/rUpVRdamz/dashboard-links-with-variables?orgId=1?time=1500000000000&time.window=10000)

---

<div class="post-metadata">

**Author:** ![rashmilkukreja](https://avatars.discourse-cdn.com/v4/letter/r/f1d935/32.png) [@rashmilkukreja](https://community.grafana.com/u/rashmilkukreja)\
**Post date:** [January 5, 2024, 12:54pm UTC](https://community.grafana.com/t/controlling-time-range-using-the-url/69313/3 "2024-01-05T12:54:59Z")

</div>

Did you get solution of this? I am also trying same
