<?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 How to exclude all days of one month from a time range? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-all-days-of-one-month-from-a-time-range/m-p/466632#M131365</link>
    <description>&lt;P&gt;Here is the part of the search that I am working on, and trying to exclude certain numbers of days. However,  &lt;CODE&gt;where Date != 20190401&lt;/CODE&gt; removes only April 1st from the result. I need to exclude all the days of April.&lt;/P&gt;

&lt;P&gt;index:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| where Date != "20190401"
| stats sum(claim_nums) as "Total Claims" by Date
| appendpipe [ stats avg("Total Claims") as ClaimAvg 
| eval ClaimAvg = round(ClaimAvg,2) | eval "Total Claims" = "TOTAL AVG CLAIMS ".ClaimAvg 
| fields - ClaimAvg]
| sort - DATE
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried adding multiple dates in the  &lt;CODE&gt;where&lt;/CODE&gt; command, but it doesn't work.&lt;/P&gt;</description>
    <pubDate>Thu, 28 May 2020 18:33:29 GMT</pubDate>
    <dc:creator>chinmay25</dc:creator>
    <dc:date>2020-05-28T18:33:29Z</dc:date>
    <item>
      <title>How to exclude all days of one month from a time range?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-all-days-of-one-month-from-a-time-range/m-p/466632#M131365</link>
      <description>&lt;P&gt;Here is the part of the search that I am working on, and trying to exclude certain numbers of days. However,  &lt;CODE&gt;where Date != 20190401&lt;/CODE&gt; removes only April 1st from the result. I need to exclude all the days of April.&lt;/P&gt;

&lt;P&gt;index:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| where Date != "20190401"
| stats sum(claim_nums) as "Total Claims" by Date
| appendpipe [ stats avg("Total Claims") as ClaimAvg 
| eval ClaimAvg = round(ClaimAvg,2) | eval "Total Claims" = "TOTAL AVG CLAIMS ".ClaimAvg 
| fields - ClaimAvg]
| sort - DATE
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried adding multiple dates in the  &lt;CODE&gt;where&lt;/CODE&gt; command, but it doesn't work.&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 18:33:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-all-days-of-one-month-from-a-time-range/m-p/466632#M131365</guid>
      <dc:creator>chinmay25</dc:creator>
      <dc:date>2020-05-28T18:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude all days of one month from a time range?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-all-days-of-one-month-from-a-time-range/m-p/466633#M131366</link>
      <description>&lt;P&gt;I'll bet you tried &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| where Date != "20190401" OR  Date != "20190402" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Every record will always be either not the first value or not the second value.  You need to use AND to make that kind of code work.&lt;/P&gt;

&lt;P&gt;However, you can also do something like this to test them all at the same time, assuming Date is a text field.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| where ( substr(Date,1,6)!="201904" ) 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 May 2020 20:34:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-all-days-of-one-month-from-a-time-range/m-p/466633#M131366</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2020-05-28T20:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude all days of one month from a time range?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-all-days-of-one-month-from-a-time-range/m-p/466634#M131367</link>
      <description>&lt;P&gt;Thanks. Yes I tried the first option but it didn't work. The second option works perfect. Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 20:51:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-all-days-of-one-month-from-a-time-range/m-p/466634#M131367</guid>
      <dc:creator>chinmay25</dc:creator>
      <dc:date>2020-05-28T20:51:56Z</dc:date>
    </item>
  </channel>
</rss>

