<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: exclude time range in splunk query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/exclude-time-range-in-splunk-query/m-p/583235#M203090</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/54377"&gt;@kirrusk&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;what do you mean with "&lt;SPAN&gt;results with two days events (timestamps)." date_wday it's the same extraction than "| eval DayofWeek=strftime(_time,"%w")".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Anyway, yu can use your field evals and use my filter:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index = _internal 
| eval Hour=strftime(_time,"%H")
| eval Minute=strftime(_time,"%M")
| eval DayofWeek=strftime(_time,"%A")
| eval Month=strftime(_time,"%m")
| eval WeekOfYear=strftime(_time,"%U")
| search NOT DayofWeek="Wednsday" AND (Hour&amp;gt;=10 Hour&amp;lt;=13)&lt;/LI-CODE&gt;&lt;P&gt;is this the real condition you want?&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;exclude Wednsday and take hours between 10 and 13 (with 10 and 13)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Tue, 01 Feb 2022 15:53:01 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2022-02-01T15:53:01Z</dc:date>
    <item>
      <title>exclude time range in splunk query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/exclude-time-range-in-splunk-query/m-p/583219#M203085</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to exclude events from the time range.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index = _internal 
| eval Hour=strftime(_time,"%H")
| eval Minute=strftime(_time,"%M")
| eval DayofWeek=strftime(_time,"%w")
| eval Month=strftime(_time,"%m")
| eval WeekOfYear=strftime(_time,"%U")
| search NOT DayofWeek=3 AND Hour&amp;gt;10 Hour&amp;lt;13&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;from the above query trying to exclude Wednesday and in between 10 to 13, but it excludes all the day.&lt;BR /&gt;Can anyone have suggestions?&lt;/P&gt;&lt;P&gt;Have one more scenario,&lt;/P&gt;&lt;P&gt;need to exclude Monday and Wednesday particular hours.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2022 13:59:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/exclude-time-range-in-splunk-query/m-p/583219#M203085</guid>
      <dc:creator>kirrusk</dc:creator>
      <dc:date>2022-02-01T13:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: exclude time range in splunk query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/exclude-time-range-in-splunk-query/m-p/583221#M203087</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/54377"&gt;@kirrusk&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;at first, probably, you don't need to use eval to have hour, minute, etc..., you should have date_hour, date_minute, etc...&lt;/P&gt;&lt;P&gt;Anyway, to exclude &lt;SPAN&gt;Wednesday&amp;nbsp;and days of the mont between 10 and 13 (comprehensive of 10 and 13), you could use something like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index = _internal date_wday|="Wednesday " (date_mday&amp;lt;10 AND date_mday&amp;gt;13)
| ...&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2022 14:15:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/exclude-time-range-in-splunk-query/m-p/583221#M203087</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-02-01T14:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: exclude time range in splunk query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/exclude-time-range-in-splunk-query/m-p/583226#M203089</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp; date_wday not working properly, it's giving results with two days events (timestamps). So I'm using eval to take from _time&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2022 15:13:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/exclude-time-range-in-splunk-query/m-p/583226#M203089</guid>
      <dc:creator>kirrusk</dc:creator>
      <dc:date>2022-02-01T15:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: exclude time range in splunk query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/exclude-time-range-in-splunk-query/m-p/583235#M203090</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/54377"&gt;@kirrusk&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;what do you mean with "&lt;SPAN&gt;results with two days events (timestamps)." date_wday it's the same extraction than "| eval DayofWeek=strftime(_time,"%w")".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Anyway, yu can use your field evals and use my filter:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index = _internal 
| eval Hour=strftime(_time,"%H")
| eval Minute=strftime(_time,"%M")
| eval DayofWeek=strftime(_time,"%A")
| eval Month=strftime(_time,"%m")
| eval WeekOfYear=strftime(_time,"%U")
| search NOT DayofWeek="Wednsday" AND (Hour&amp;gt;=10 Hour&amp;lt;=13)&lt;/LI-CODE&gt;&lt;P&gt;is this the real condition you want?&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;exclude Wednsday and take hours between 10 and 13 (with 10 and 13)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2022 15:53:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/exclude-time-range-in-splunk-query/m-p/583235#M203090</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-02-01T15:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: exclude time range in splunk query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/exclude-time-range-in-splunk-query/m-p/584054#M203395</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/54377"&gt;@kirrusk&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Hi good for you, see next time.&lt;/P&gt;&lt;P&gt;Ciao and happy splunking.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 07:53:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/exclude-time-range-in-splunk-query/m-p/584054#M203395</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-02-08T07:53:10Z</dc:date>
    </item>
  </channel>
</rss>

