<?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 Using &amp;quot;earliest&amp;quot; and other time modifiers in ad hoc queries in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-quot-earliest-quot-and-other-time-modifiers-in-ad-hoc/m-p/580272#M202188</link>
    <description>&lt;P&gt;Is it possible to put time modifiers like "earliest" into a search and essentially disregard the time range drop-down in the Splunk UI? I have data that is logged once every 24 hours, so I'd like to embed "WHERE earliest=-24h" into a rather large, complicated query so I can cut-and-paste from my notes without having to mess around with the drop-down (or more importantly, so I don't need to make additional notes to remind myself to set the drop-down).&lt;/P&gt;&lt;P&gt;I tried something like this:&lt;/P&gt;&lt;PRE&gt;index=iis sourcetype=xxxx host=xxxx | WHERE earliest=-24h | eval... | table...&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;But the UI shows "Error in 'where' command: the operator at 'h' is invalid.&lt;/P&gt;</description>
    <pubDate>Fri, 07 Jan 2022 14:42:39 GMT</pubDate>
    <dc:creator>mv10</dc:creator>
    <dc:date>2022-01-07T14:42:39Z</dc:date>
    <item>
      <title>Using "earliest" and other time modifiers in ad hoc queries</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-quot-earliest-quot-and-other-time-modifiers-in-ad-hoc/m-p/580272#M202188</link>
      <description>&lt;P&gt;Is it possible to put time modifiers like "earliest" into a search and essentially disregard the time range drop-down in the Splunk UI? I have data that is logged once every 24 hours, so I'd like to embed "WHERE earliest=-24h" into a rather large, complicated query so I can cut-and-paste from my notes without having to mess around with the drop-down (or more importantly, so I don't need to make additional notes to remind myself to set the drop-down).&lt;/P&gt;&lt;P&gt;I tried something like this:&lt;/P&gt;&lt;PRE&gt;index=iis sourcetype=xxxx host=xxxx | WHERE earliest=-24h | eval... | table...&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;But the UI shows "Error in 'where' command: the operator at 'h' is invalid.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jan 2022 14:42:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-quot-earliest-quot-and-other-time-modifiers-in-ad-hoc/m-p/580272#M202188</guid>
      <dc:creator>mv10</dc:creator>
      <dc:date>2022-01-07T14:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: Using "earliest" and other time modifiers in ad hoc queries</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-quot-earliest-quot-and-other-time-modifiers-in-ad-hoc/m-p/580275#M202189</link>
      <description>&lt;P&gt;You can use earliest, latest etc. in your base search, don't use | and where. Just&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=iis sourcetype=xxxx host=xxxx earliest=-24h | eval... | table...&lt;/LI-CODE&gt;&lt;P&gt;This is even more efficient way to do queries that add where or search on the right side of first pipe (|).&lt;/P&gt;&lt;P&gt;r. Ismo&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jan 2022 14:46:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-quot-earliest-quot-and-other-time-modifiers-in-ad-hoc/m-p/580275#M202189</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2022-01-07T14:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using "earliest" and other time modifiers in ad hoc queries</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-quot-earliest-quot-and-other-time-modifiers-in-ad-hoc/m-p/580276#M202190</link>
      <description>&lt;P&gt;Bah... the "WHERE" clause is unnecessary (got that from somewhere in the docs) ... just specifying "earliest" as one of the criteria is adequate.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jan 2022 14:48:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-quot-earliest-quot-and-other-time-modifiers-in-ad-hoc/m-p/580276#M202190</guid>
      <dc:creator>mv10</dc:creator>
      <dc:date>2022-01-07T14:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using "earliest" and other time modifiers in ad hoc queries</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-quot-earliest-quot-and-other-time-modifiers-in-ad-hoc/m-p/580277#M202191</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jan 2022 14:55:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-quot-earliest-quot-and-other-time-modifiers-in-ad-hoc/m-p/580277#M202191</guid>
      <dc:creator>mv10</dc:creator>
      <dc:date>2022-01-07T14:55:34Z</dc:date>
    </item>
  </channel>
</rss>

