# Is it possible to get the selected timeframe in the new dashboard from the code tail?

**URL:** <https://community.dynatrace.com/t/is-it-possible-to-get-the-selected-timeframe-in-the-new-dashboard-from-the-code-tail/42009>\
**Category:** Dashboarding\
**Tags:** latest-dynatrace, dashboards, charts\
**Created:** [October 10, 2023, 12:18pm UTC](https://community.dynatrace.com/t/is-it-possible-to-get-the-selected-timeframe-in-the-new-dashboard-from-the-code-tail/42009 "2023-10-10T12:18:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![andreaCaria](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@andreaCaria](https://community.dynatrace.com/u/andreaCaria)\
**Post date:** [October 10, 2023, 12:18pm UTC](https://community.dynatrace.com/t/is-it-possible-to-get-the-selected-timeframe-in-the-new-dashboard-from-the-code-tail/42009/1 "2023-10-10T12:18:37Z")

</div>

Hi, there is a possibility to get the selected timeframe in the new dashboard from the code tail? I need to fetch data, from the api-v2, according to the selected timeframe.

---

<div class="post-metadata">

**Author:** ![izabelarokita](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/izabelarokita/32/41812_2.png) [@izabelarokita](https://community.dynatrace.com/u/izabelarokita)\
**Post date:** [December 13, 2023, 12:27pm UTC](https://community.dynatrace.com/t/is-it-possible-to-get-the-selected-timeframe-in-the-new-dashboard-from-the-code-tail/42009/2 "2023-12-13T12:27:25Z")

</div>

Hello&nbsp;[@andreaCaria](https://community.dynatrace.com/user/63636)&nbsp;,  
Any luck with finding the answer to your question? Please let me know, do you still require our Community help 🙂

---

<div class="post-metadata">

**Author:** ![andreaCaria](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@andreaCaria](https://community.dynatrace.com/u/andreaCaria)\
**Post date:** [December 13, 2023, 12:44pm UTC](https://community.dynatrace.com/t/is-it-possible-to-get-the-selected-timeframe-in-the-new-dashboard-from-the-code-tail/42009/3 "2023-12-13T12:44:41Z")

</div>

Yes, I found the solution thank you so much

---

<div class="post-metadata">

**Author:** ![ZackE](https://avatars.discourse-cdn.com/v4/letter/z/9fc29f/32.png) [@ZackE](https://community.dynatrace.com/u/ZackE)\
**Post date:** [August 15, 2025, 5:10pm UTC](https://community.dynatrace.com/t/is-it-possible-to-get-the-selected-timeframe-in-the-new-dashboard-from-the-code-tail/42009/4 "2025-08-15T17:10:35Z")

</div>

Hi Andrea,

What was the solution for this? I’m interested in using JS code to get the timeframe from the selector in gen 3 dashboards.
