'Kusto query language - How to get exactly logs from previous day 7

Kusto query language - How to get exact logs from 7 days ago

Example: Today is 03/17, I need a query that gets me logs only from 03/10.

I'm trying to use

pageViews | where timestamp > ago(7d)

but it returns logs between 10/03 and 17/03

I need exactly the logs of the day.



Solution 1:[1]

you could try using the startofday() function and the between() function.

for example:

PageViews
| where timestamp between(startofday(ago(7d)) .. 1d)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Yoni L.