<?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 Why are Time Modifiers not working with SPL CLI? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-are-Time-Modifiers-not-working-with-SPL-CLI/m-p/421906#M167125</link>
    <description>&lt;P&gt;Doing a search on CLI with time range modifiers does not seem to work.&lt;/P&gt;

&lt;P&gt;I have tried earliest_time/latest_time and index_earliest/index_latest. &lt;/P&gt;

&lt;P&gt;I have tired formatting  mm/dd/yyy and yyyy-mm-dd.&lt;/P&gt;

&lt;P&gt;Format of command is: /opt/splunk/bin/splunk search 'search details' earliest_time=yyyy-mm-dd latest_time=yyyy-mm-dd.&lt;/P&gt;

&lt;P&gt;The search works as expected w/out the time range modifiers - and of course works via web. When I try this  earliest_time=2018-05-01 latest_time=2018-06-01 max_out=0  I get results from 09/13??&lt;/P&gt;

&lt;P&gt;I am running this on the search head in a distributed environment.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 21:35:17 GMT</pubDate>
    <dc:creator>tracieed_nord</dc:creator>
    <dc:date>2020-09-29T21:35:17Z</dc:date>
    <item>
      <title>Why are Time Modifiers not working with SPL CLI?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-are-Time-Modifiers-not-working-with-SPL-CLI/m-p/421906#M167125</link>
      <description>&lt;P&gt;Doing a search on CLI with time range modifiers does not seem to work.&lt;/P&gt;

&lt;P&gt;I have tried earliest_time/latest_time and index_earliest/index_latest. &lt;/P&gt;

&lt;P&gt;I have tired formatting  mm/dd/yyy and yyyy-mm-dd.&lt;/P&gt;

&lt;P&gt;Format of command is: /opt/splunk/bin/splunk search 'search details' earliest_time=yyyy-mm-dd latest_time=yyyy-mm-dd.&lt;/P&gt;

&lt;P&gt;The search works as expected w/out the time range modifiers - and of course works via web. When I try this  earliest_time=2018-05-01 latest_time=2018-06-01 max_out=0  I get results from 09/13??&lt;/P&gt;

&lt;P&gt;I am running this on the search head in a distributed environment.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:35:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-are-Time-Modifiers-not-working-with-SPL-CLI/m-p/421906#M167125</guid>
      <dc:creator>tracieed_nord</dc:creator>
      <dc:date>2020-09-29T21:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: Why are Time Modifiers not working with SPL CLI?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-are-Time-Modifiers-not-working-with-SPL-CLI/m-p/421907#M167126</link>
      <description>&lt;P&gt;you need to convert time using strftime and then compare with earliest and latest instead of earliest_time and latest_time&lt;BR /&gt;
    eval time = strftime(&lt;YOURDATETIME&gt;, "%Y-%m-%d")&lt;/YOURDATETIME&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:35:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-are-Time-Modifiers-not-working-with-SPL-CLI/m-p/421907#M167126</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2020-09-29T21:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: Why are Time Modifiers not working with SPL CLI?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-are-Time-Modifiers-not-working-with-SPL-CLI/m-p/421908#M167127</link>
      <description>&lt;P&gt;As far as I know, "earliest/latest" are not supported in CLI searches - according to the documentation? And why do I have to convert? &lt;BR /&gt;
Thanx&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2018 16:13:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-are-Time-Modifiers-not-working-with-SPL-CLI/m-p/421908#M167127</guid>
      <dc:creator>tracieed_nord</dc:creator>
      <dc:date>2018-10-10T16:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: Why are Time Modifiers not working with SPL CLI?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-are-Time-Modifiers-not-working-with-SPL-CLI/m-p/421909#M167128</link>
      <description>&lt;P&gt;The conversion needs to be done as the time values is considered in seconds format. You can use&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval start_time = strftime("2018-05-01", "%Y-%m-%d") | eval end_time=strftime("2018-06-01", "%Y-%m-%d")|
where ( _time &amp;gt; start_time and _time &amp;lt; end_time)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Oct 2018 18:55:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-are-Time-Modifiers-not-working-with-SPL-CLI/m-p/421909#M167128</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2018-10-10T18:55:33Z</dc:date>
    </item>
  </channel>
</rss>

