# DQL Query: Filtering Logs by Time Range Across Multiple Days

**URL:** <https://community.dynatrace.com/t/dql-query-filtering-logs-by-time-range-across-multiple-days/44141>\
**Category:** DQL\
**Tags:** dql, timeframe\
**Created:** [February 15, 2024, 11:31am UTC](https://community.dynatrace.com/t/dql-query-filtering-logs-by-time-range-across-multiple-days/44141 "2024-02-15T11:31:02Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![JerryJ](https://avatars.discourse-cdn.com/v4/letter/j/ed8c4c/32.png) [@JerryJ](https://community.dynatrace.com/u/JerryJ)\
**Post date:** [February 15, 2024, 11:31am UTC](https://community.dynatrace.com/t/dql-query-filtering-logs-by-time-range-across-multiple-days/44141/1 "2024-02-15T11:31:02Z")

</div>

Hi everyone, I’m trying to write a DQL query that filters the fetch logs by a specific time range across multiple days. For example, I want to retrieve only the logs from 22:00 to 07:00 for each day in a week, without having to change the query manually for each day. The documentation on the DT website shows how to use the timeframe parameter - fetch logs, timeframe:“2021-10-20T00:00:00Z/2021-10-28T12:00:00Z”, but it returns all the logs between the start and end dates, not the ones that match the time range I need per day. Is it possible to achieve this?

---

_[View the full topic](https://community.dynatrace.com/t/dql-query-filtering-logs-by-time-range-across-multiple-days/44141)._
