<?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 Cannot use earliest and latest for _time field newly converted from other field ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Cannot-use-earliest-and-latest-for-time-field-newly-converted/m-p/80919#M20453</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;When i trigger a search like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host="win20_oslo-ifs_CC-DC" index="sqlobj" | multikv | eval BusinessEpoch=strptime(BusinessDay,"%m/%d/%Y %I:%M:%S %p") | eval _time=BusinessEpoch  | table _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It gives a table of _time field that is converted from BusinessDay, but if i use:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host="win20_oslo-ifs_CC-DC" index="sqlobj" | multikv | eval BusinessEpoch=strptime(BusinessDay,"%m/%d/%Y %I:%M:%S %p") | eval _time=BusinessEpoch  | search earliest=-1d latest=now | table _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've got no result , and i tried several times by changing the value of earliest or lastest but couldn't be successful. Can you suggest me what to do ?&lt;/P&gt;</description>
    <pubDate>Tue, 08 Jan 2013 15:25:17 GMT</pubDate>
    <dc:creator>sieutruc</dc:creator>
    <dc:date>2013-01-08T15:25:17Z</dc:date>
    <item>
      <title>Cannot use earliest and latest for _time field newly converted from other field ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Cannot-use-earliest-and-latest-for-time-field-newly-converted/m-p/80919#M20453</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;When i trigger a search like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host="win20_oslo-ifs_CC-DC" index="sqlobj" | multikv | eval BusinessEpoch=strptime(BusinessDay,"%m/%d/%Y %I:%M:%S %p") | eval _time=BusinessEpoch  | table _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It gives a table of _time field that is converted from BusinessDay, but if i use:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host="win20_oslo-ifs_CC-DC" index="sqlobj" | multikv | eval BusinessEpoch=strptime(BusinessDay,"%m/%d/%Y %I:%M:%S %p") | eval _time=BusinessEpoch  | search earliest=-1d latest=now | table _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've got no result , and i tried several times by changing the value of earliest or lastest but couldn't be successful. Can you suggest me what to do ?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jan 2013 15:25:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Cannot-use-earliest-and-latest-for-time-field-newly-converted/m-p/80919#M20453</guid>
      <dc:creator>sieutruc</dc:creator>
      <dc:date>2013-01-08T15:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot use earliest and latest for _time field newly converted from other field ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Cannot-use-earliest-and-latest-for-time-field-newly-converted/m-p/80920#M20454</link>
      <description>&lt;P&gt;Did you try without "lastest"? Because that's a typo - it should be "latest"...&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jan 2013 15:38:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Cannot-use-earliest-and-latest-for-time-field-newly-converted/m-p/80920#M20454</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-01-08T15:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot use earliest and latest for _time field newly converted from other field ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Cannot-use-earliest-and-latest-for-time-field-newly-converted/m-p/80921#M20455</link>
      <description>&lt;P&gt;Thanks, yes i did one of both separately, but got no success too&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jan 2013 15:48:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Cannot-use-earliest-and-latest-for-time-field-newly-converted/m-p/80921#M20455</guid>
      <dc:creator>sieutruc</dc:creator>
      <dc:date>2013-01-08T15:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot use earliest and latest for _time field newly converted from other field ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Cannot-use-earliest-and-latest-for-time-field-newly-converted/m-p/80922#M20456</link>
      <description>&lt;P&gt;The earliest and latest searchterms will only function in the search command when it's the initial search command in the pipeline.   This is because those searchterms are really just a shorthand way to submit the "earliest" and "latest" arguments to the Splunk search API, back when the search is being dispatched initially. &lt;/P&gt;

&lt;P&gt;So to filter by time further down in the search pipeline, I would use the "relative_time" function that's available in the eval and where commands.  &lt;/P&gt;

&lt;P&gt;Specifically : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| where _time&amp;gt;=relative_time(now(),"-1h") AND _time&amp;lt;now()
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Jan 2013 02:20:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Cannot-use-earliest-and-latest-for-time-field-newly-converted/m-p/80922#M20456</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-01-09T02:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot use earliest and latest for _time field newly converted from other field ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Cannot-use-earliest-and-latest-for-time-field-newly-converted/m-p/80923#M20457</link>
      <description>&lt;P&gt;So... side question...&lt;/P&gt;

&lt;P&gt;Is there any way to "reset" the "search timeframe" so that all the "commands that bin" will honor a new "search timeframe" instead of the timeframe used in the original query?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 18:16:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Cannot-use-earliest-and-latest-for-time-field-newly-converted/m-p/80923#M20457</guid>
      <dc:creator>vbumgarner</dc:creator>
      <dc:date>2017-06-27T18:16:22Z</dc:date>
    </item>
  </channel>
</rss>

