# Using Timeframe Selector as an input for a DQL query

**URL:** <https://community.dynatrace.com/t/using-timeframe-selector-as-an-input-for-a-dql-query/38758>\
**Category:** Developer Q&A Forum\
**Tags:** strato, coding-assistance\
**Created:** [March 9, 2023, 8:30am UTC](https://community.dynatrace.com/t/using-timeframe-selector-as-an-input-for-a-dql-query/38758 "2023-03-09T08:30:31Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![3ene](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/3ene/32/33646_2.png) [@3ene](https://community.dynatrace.com/u/3ene)\
**Post date:** [March 9, 2023, 8:30am UTC](https://community.dynatrace.com/t/using-timeframe-selector-as-an-input-for-a-dql-query/38758/1 "2023-03-09T08:30:31Z")

</div>

Hi,

I’m trying to use a Timeframe Selector ([https://developer.dynatrace.com/reference/design-system/preview/forms/TimeframeSelector/](https://developer.dynatrace.com/reference/design-system/preview/forms/TimeframeSelector/)) for user input for my DQL query. It’s not working as the output of the selector is not compatible with DQL.

Specifically, this is the output of _timeframe.from_ and _timeframe.to:_

![3ene_0-1678350471031.png](https://global.discourse-cdn.com/dynatrace/original/2X/0/05df1725064d71d1df3d2cfd311fe01cdc78dc39.png)

The DQL editor complains about that because ‘now’ is a dynamic variable, and DQL queries only work with static ones. Ergo, only _now()_&nbsp;would work.

Can someone tell me how to do the conversion properly?

Thank you.

---

_[View the full topic](https://community.dynatrace.com/t/using-timeframe-selector-as-an-input-for-a-dql-query/38758)._
