<?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 query for time in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/query-for-time/m-p/103530#M21770</link>
    <description>&lt;P&gt;I need a query that will extract all log data between (say) 10:00 PM and 10:00 AM.  What is the best way to accomplish this?&lt;/P&gt;

&lt;P&gt;TIA&lt;/P&gt;</description>
    <pubDate>Tue, 17 May 2011 17:01:27 GMT</pubDate>
    <dc:creator>DTERM</dc:creator>
    <dc:date>2011-05-17T17:01:27Z</dc:date>
    <item>
      <title>query for time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/query-for-time/m-p/103530#M21770</link>
      <description>&lt;P&gt;I need a query that will extract all log data between (say) 10:00 PM and 10:00 AM.  What is the best way to accomplish this?&lt;/P&gt;

&lt;P&gt;TIA&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2011 17:01:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/query-for-time/m-p/103530#M21770</guid>
      <dc:creator>DTERM</dc:creator>
      <dc:date>2011-05-17T17:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: query for time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/query-for-time/m-p/103531#M21771</link>
      <description>&lt;PRE&gt;&lt;CODE&gt; index=* earliest=05/16/2011:22:0:0 latest=05/17/2011:10:0:0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://www.splunk.com/base/Documentation/latest/User/ChangeTheTimeRangeOfYourSearch"&gt;http://www.splunk.com/base/Documentation/latest/User/ChangeTheTimeRangeOfYourSearch&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Specify absolute time ranges in your search&lt;/P&gt;

&lt;P&gt;When searching or saving a search, you can specify time ranges using the following attributes:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest=&amp;lt;time_modifier&amp;gt; 
latest=&amp;lt;time_modifier&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For exact time ranges, the syntax of time_modifier is: %m/%d/%Y:%H:%M:%S. For example, to specify a time range from 12AM October 19, 2009 to 12AM October 27, 2009:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest=10/19/2009:0:0:0 latest=10/27/2009:0:0:0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you specify only the "earliest" attribute, "latest" is set to the current time (now) by default. In general, you won't specify "latest" without an "earliest" time.&lt;/P&gt;

&lt;P&gt;Important: When you specify a time range in your search or saved search, it overrides the time range that is selected in the dropdown menu. However, the time range specified directly in the search string will not apply to subsearches (but the dropdown selected range will apply). &lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2011 17:06:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/query-for-time/m-p/103531#M21771</guid>
      <dc:creator>jbsplunk</dc:creator>
      <dc:date>2011-05-17T17:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: query for time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/query-for-time/m-p/103532#M21772</link>
      <description>&lt;P&gt;can earliest only be time or does it have to include date? because the only way i find myself to search time range across differents dates is to use a search which says :&lt;/P&gt;

&lt;P&gt;date_hour &amp;gt; 23 OR date_hour &amp;lt; 11 and then select a date range  in the dropdown menu&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:34:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/query-for-time/m-p/103532#M21772</guid>
      <dc:creator>MarioM</dc:creator>
      <dc:date>2020-09-28T09:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: query for time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/query-for-time/m-p/103533#M21773</link>
      <description>&lt;P&gt;It does not have to include a date. Relative time modifiers can be used as per the documentation here:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.splunk.com/base/Documentation/latest/User/ChangeTheTimeRangeOfYourSearch#Syntax_for_relative_time_modifiers"&gt;http://www.splunk.com/base/Documentation/latest/User/ChangeTheTimeRangeOfYourSearch#Syntax_for_relative_time_modifiers&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;so something like 'earliest=@d-2h' specifies 10PM, for example.&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2011 17:34:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/query-for-time/m-p/103533#M21773</guid>
      <dc:creator>jbsplunk</dc:creator>
      <dc:date>2011-05-17T17:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: query for time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/query-for-time/m-p/103534#M21774</link>
      <description>&lt;P&gt;thanks! for the original question example it will be something like&lt;/P&gt;

&lt;P&gt;'earliest=@d-2h latest=@d+10' ?&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2011 17:47:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/query-for-time/m-p/103534#M21774</guid>
      <dc:creator>MarioM</dc:creator>
      <dc:date>2011-05-17T17:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: query for time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/query-for-time/m-p/103535#M21775</link>
      <description>&lt;P&gt;That ought to do it.&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2011 17:53:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/query-for-time/m-p/103535#M21775</guid>
      <dc:creator>jbsplunk</dc:creator>
      <dc:date>2011-05-17T17:53:08Z</dc:date>
    </item>
  </channel>
</rss>

