# TIPS - DQL Timeframe selection

**URL:** <https://community.dynatrace.com/t/tips-dql-timeframe-selection/42655>\
**Category:** Dynatrace Tips\
**Tags:** dql, timeframe, tips-and-tricks\
**Created:** [November 16, 2023, 1:21pm UTC](https://community.dynatrace.com/t/tips-dql-timeframe-selection/42655 "2023-11-16T13:21:42Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Christophe\_N](https://avatars.discourse-cdn.com/v4/letter/c/b5a626/32.png) [@Christophe\_N](https://community.dynatrace.com/u/Christophe_N)\
**Post date:** [March 4, 2024, 12:56pm UTC](https://community.dynatrace.com/t/tips-dql-timeframe-selection/42655/5 "2024-03-04T12:56:19Z")

</div>

Hi all ,

Thanks for the tip here&nbsp;😀  
Do you have any other tip if we want to go through relative timeframe?

like if I want relative timings (like “now-1h/h to now-0h/h”) or “from: now-1M/M to :now-0M/M” , I have the message “ **The parameter `from` has to be constant** ”  
I have not found any tips to do so.

Temp solution I have found is to query larger data and then filter afterwards :

```markup
|filter getHour(timestamp) >= (getHour(now())-1) and getHour(timestamp) < getHour(now())

```

Is it possible to do it directly from timeframe filter ?

Best regards,

Christophe

---

_[View the full topic](https://community.dynatrace.com/t/tips-dql-timeframe-selection/42655)._
