Splunk Search

Skip one hour in one day search

abhi144
New Member

I wanted to search for full day except one hour from 6.30am to 7.30am. I am not able to do it. Can anyone help me in this.

0 Karma
1 Solution

Ayn
Legend

There's no foolproof way of putting this as an initial filter in your search that I know of, however you could create fields and then filter on those:

<yourbasesearch> | eval hourandminute=strftime(_time,"%H").strftime(_time,"%M") | search NOT (hourandminute>=630 AND hourandminute<=730)

View solution in original post

Ayn
Legend

There's no foolproof way of putting this as an initial filter in your search that I know of, however you could create fields and then filter on those:

<yourbasesearch> | eval hourandminute=strftime(_time,"%H").strftime(_time,"%M") | search NOT (hourandminute>=630 AND hourandminute<=730)

abhi144
New Member

Thanks Ayn.

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...