<?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: Search within sub-time range in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-within-sub-time-range/m-p/36451#M8104</link>
    <description>&lt;P&gt;You can add the following search criteria:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;((date_hour &amp;gt; 17) OR (date_hour &amp;lt; 7))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And that should get you where you want to be. Personally, I use:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;((date_wday="saturday" OR date_wday="sunday") OR (date_hour &amp;lt; 7 OR date_hour &amp;gt; 17))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can then toss that in &lt;A href="http://www.splunk.com/base/Documentation/latest/admin/macrosconf" rel="nofollow"&gt;macros.conf&lt;/A&gt; like so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[OffHours]
definition = ((date_wday="saturday" OR date_wday="sunday") OR (date_hour &amp;lt; 7 OR date_hour &amp;gt; 17))
iseval = 0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;so you can just add in &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;`OffHours`
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;to your searches and have it automatically included.&lt;/P&gt;</description>
    <pubDate>Tue, 01 Feb 2011 09:15:20 GMT</pubDate>
    <dc:creator>David</dc:creator>
    <dc:date>2011-02-01T09:15:20Z</dc:date>
    <item>
      <title>Search within sub-time range</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-within-sub-time-range/m-p/36450#M8103</link>
      <description>&lt;P&gt;I am trying to collect stats from login events from evening hours.  I would like to run reports for any time range (last 60m, 7d, etc.) but only view results that show logons between the hours of 5pm and 7am.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2011 09:04:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-within-sub-time-range/m-p/36450#M8103</guid>
      <dc:creator>ghnwmlguy</dc:creator>
      <dc:date>2011-02-01T09:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Search within sub-time range</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-within-sub-time-range/m-p/36451#M8104</link>
      <description>&lt;P&gt;You can add the following search criteria:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;((date_hour &amp;gt; 17) OR (date_hour &amp;lt; 7))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And that should get you where you want to be. Personally, I use:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;((date_wday="saturday" OR date_wday="sunday") OR (date_hour &amp;lt; 7 OR date_hour &amp;gt; 17))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can then toss that in &lt;A href="http://www.splunk.com/base/Documentation/latest/admin/macrosconf" rel="nofollow"&gt;macros.conf&lt;/A&gt; like so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[OffHours]
definition = ((date_wday="saturday" OR date_wday="sunday") OR (date_hour &amp;lt; 7 OR date_hour &amp;gt; 17))
iseval = 0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;so you can just add in &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;`OffHours`
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;to your searches and have it automatically included.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2011 09:15:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-within-sub-time-range/m-p/36451#M8104</guid>
      <dc:creator>David</dc:creator>
      <dc:date>2011-02-01T09:15:20Z</dc:date>
    </item>
  </channel>
</rss>

