How to Filter Incidents by Creation Time in XQL Within a Specific Timeframe?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to Filter Incidents by Creation Time in XQL Within a Specific Timeframe?

L1 Bithead

I need to write an XQL query for a fortnightly report. The query I currently use is shown below, but it's incorrect for my purpose:

config timeframe between "2025-03-01 00:00:00 +0000" and "2025-03-15 23:59:59 +0000" 
| dataset = incidents 
| filter status in (ENUM.RESOLVED_FALSE_POSITIVE, ENUM.RESOLVED_TRUE_POSITIVE)

 

Although I have defined the timeframe, this query does not filter incidents created only within that timeframe. It includes incidents that may have been created outside the timeframe but were updated during the timeframe.

 

What I actually need is to filter and list only the incidents that were created during this specific timeframe (from March 1 to March 15, 2025)

2 REPLIES 2

L6 Presenter

You may try something like below:
dataset = incidents
| filter status in (ENUM.RESOLVED_FALSE_POSITIVE, ENUM.RESOLVED_TRUE_POSITIVE)
|filter creation_time >= "2025-03-01 00:00:00 +0000" and creation_time <="2025-03-15 23:59:59 +0000"
| fields incident_id, creation_time, status, severity, description

 

If you feel this has answered your query, please let us know by clicking like and  on "mark this as a Solution". Thank you.

Ashutosh Patil

image (1).png

This error occurs.

  • 296 Views
  • 2 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!