# How to give custom timeframe for the timeseries while writing DQL?

**URL:** <https://community.dynatrace.com/t/how-to-give-custom-timeframe-for-the-timeseries-while-writing-dql/44580>\
**Category:** DQL\
**Tags:** dql, workflows\
**Created:** [March 12, 2024, 3:20am UTC](https://community.dynatrace.com/t/how-to-give-custom-timeframe-for-the-timeseries-while-writing-dql/44580 "2024-03-12T03:20:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![theharithsa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/theharithsa/32/16236_2.png) [@theharithsa](https://community.dynatrace.com/u/theharithsa)\
**Post date:** [March 12, 2024, 3:20am UTC](https://community.dynatrace.com/t/how-to-give-custom-timeframe-for-the-timeseries-while-writing-dql/44580/1 "2024-03-12T03:20:12Z")

</div>

Hey Team,

I have a quick question to the community. How can we add custom timeframe for timeseries query (DQL)? It would help me in creating some workflows for the same. My use case is to create a workflow based on the result of DQL timeseries.

---

<div class="post-metadata">

**Author:** ![theharithsa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/theharithsa/32/16236_2.png) [@theharithsa](https://community.dynatrace.com/u/theharithsa)\
**Post date:** [March 12, 2024, 6:18am UTC](https://community.dynatrace.com/t/how-to-give-custom-timeframe-for-the-timeseries-while-writing-dql/44580/2 "2024-03-12T06:18:39Z")

</div>

I found a way for it. It is as similar to the one while fetching logs.

```javascript
timeseries by:{jo.nce_code,jo.channel}, {
      nce_count=sum(log.jo.nceCount) 
  }, interval: 1h, from:now()-48h, to:now()-24h

```
