Filter dynamic time range

Is it possible to filter the time with a time range only, e.g. from 5:30am yesterday to 5:30am today?

Hi Stefan,
this should be the query

fetch logs, from: bin(now()-1d, 1d) + 17h + 30m, to: bin(now(), 1d) + 17h + 30m

basically, you make use of the from an to parameters.

  • with now()-1d, you specify the timeframe exactly 24h ago
  • then with bin(now()-1d, 1d) you round it to the start at the day, so at midnight
  • then you add the time of the day with + 17h + 30m

Best,Sini

Also,
If your timezone is not in UTC then you might have to subtract/add that from the timeframe as Sini mentioned above.
My timezone is UTC+5:30 so I had to

from: bin(now()-1d, 1d) -5h -30m, to: bin(now(), 1d) -5h - 30m

do this to get the data of previous day.

Thanks @sinisa_zubic this saved lot of effort for me :smiley:.

Regards,

Maheedhar.