<?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: Using earliest and latest variables in a form in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-earliest-and-latest-variables-in-a-form/m-p/109582#M28596</link>
    <description>&lt;P&gt;You can probably do it given what you've specified as a text box, but you'd have to use the relative time specifiers (e.g. "-5m", "@d") or a fully formatted time stamp ("2014/01/09:00:00:00"), or an epoch time ("1389386013").&lt;/P&gt;

&lt;P&gt;It might be easier to use a time picker, since it's a full-featured control with lots of ways to specify the time.&lt;/P&gt;</description>
    <pubDate>Fri, 10 Jan 2014 20:37:14 GMT</pubDate>
    <dc:creator>sowings</dc:creator>
    <dc:date>2014-01-10T20:37:14Z</dc:date>
    <item>
      <title>Using earliest and latest variables in a form</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-earliest-and-latest-variables-in-a-form/m-p/109581#M28595</link>
      <description>&lt;P&gt;(Using Splunk6) Does any one know if Splunk can do something similar to this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;fieldset autoRun="false" submitButton="true"&amp;gt;
        &amp;lt;input type="text" token="earliest"&amp;gt;
          &amp;lt;label&amp;gt;earliest time&amp;lt;/label&amp;gt;
          &amp;lt;default&amp;gt;now&amp;lt;/default&amp;gt;
        &amp;lt;/input&amp;gt;
        &amp;lt;input type="text" token="latest"&amp;gt;
          &amp;lt;label&amp;gt;latest time&amp;lt;/label&amp;gt;
          &amp;lt;default&amp;gt;now&amp;lt;/default&amp;gt;
        &amp;lt;/input&amp;gt;
&amp;lt;/fieldset&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm wanting to not use a timepicker, but instead, give them two text boxes where they can specify a date range.&lt;/P&gt;

&lt;P&gt;Everytime I try to supply values I get:&lt;BR /&gt;
Invalid earliest_time&lt;/P&gt;

&lt;P&gt;Except if   I enter    0  for earliest   and now for latest.&lt;/P&gt;

&lt;P&gt;I've tried both &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EARLIEST&gt;$earliest$&amp;gt;&lt;BR /&gt;
&lt;LATEST&gt;$latest$&lt;LATEST&gt;&lt;/LATEST&gt;&lt;/LATEST&gt;&lt;/EARLIEST&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;and  then also&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;earliest=$earliest$ latest=$latest$&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;in the search&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2014 20:27:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-earliest-and-latest-variables-in-a-form/m-p/109581#M28595</guid>
      <dc:creator>adylent</dc:creator>
      <dc:date>2014-01-10T20:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using earliest and latest variables in a form</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-earliest-and-latest-variables-in-a-form/m-p/109582#M28596</link>
      <description>&lt;P&gt;You can probably do it given what you've specified as a text box, but you'd have to use the relative time specifiers (e.g. "-5m", "@d") or a fully formatted time stamp ("2014/01/09:00:00:00"), or an epoch time ("1389386013").&lt;/P&gt;

&lt;P&gt;It might be easier to use a time picker, since it's a full-featured control with lots of ways to specify the time.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2014 20:37:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-earliest-and-latest-variables-in-a-form/m-p/109582#M28596</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2014-01-10T20:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using earliest and latest variables in a form</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-earliest-and-latest-variables-in-a-form/m-p/109583#M28597</link>
      <description>&lt;P&gt;User error.   you can not use   earliest or latest as a variable.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;fieldset autoRun="false" submitButton="true"&amp;gt;
        &amp;lt;input type="text" token="earliesttime"&amp;gt;
          &amp;lt;label&amp;gt;earliest time&amp;lt;/label&amp;gt;
          &amp;lt;default&amp;gt;now&amp;lt;/default&amp;gt;
        &amp;lt;/input&amp;gt;
        &amp;lt;input type="text" token="latesttime"&amp;gt;
          &amp;lt;label&amp;gt;latest time&amp;lt;/label&amp;gt;
          &amp;lt;default&amp;gt;now&amp;lt;/default&amp;gt;
        &amp;lt;/input&amp;gt; &amp;lt;/fieldset&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Jan 2014 20:39:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-earliest-and-latest-variables-in-a-form/m-p/109583#M28597</guid>
      <dc:creator>adylent</dc:creator>
      <dc:date>2014-01-10T20:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using earliest and latest variables in a form</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-earliest-and-latest-variables-in-a-form/m-p/109584#M28598</link>
      <description>&lt;P&gt;Earliest and Latest follow a very specific format in order to be used. See here for more details: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0.1/SearchReference/SearchTimeModifiers"&gt;http://docs.splunk.com/Documentation/Splunk/6.0.1/SearchReference/SearchTimeModifiers&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Something like -1d@d (-1 day snap/truncate to the day) or -1m (-1 minute without truncating).&lt;/P&gt;

&lt;P&gt;You'd have to do something like: &lt;BR /&gt;
&amp;lt;base search&amp;gt; | eval earliest=strftime($ealiest$,"%d/%m/%Y") | search _time &amp;gt;= earliest&lt;/P&gt;

&lt;P&gt;Of course your search performance will be impacted because it'll search through ALL your events, and then try to extract those that are after "earliest". I'd stick to timepicker.&lt;/P&gt;

&lt;P&gt;Hope this helps&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2014 20:42:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-earliest-and-latest-variables-in-a-form/m-p/109584#M28598</guid>
      <dc:creator>aholzer</dc:creator>
      <dc:date>2014-01-10T20:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using earliest and latest variables in a form</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-earliest-and-latest-variables-in-a-form/m-p/109585#M28599</link>
      <description>&lt;P&gt;Hi Adylent,&lt;BR /&gt;
Did you find the solution of this problem?&lt;BR /&gt;
If yes, please let me know.I am also dealing with the same problem&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 22:16:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-earliest-and-latest-variables-in-a-form/m-p/109585#M28599</guid>
      <dc:creator>poojak2579</dc:creator>
      <dc:date>2018-10-19T22:16:34Z</dc:date>
    </item>
  </channel>
</rss>

