<?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: Relative Time from Event Field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-I-resolve-this-Relative-Time-from-Event-Field-error/m-p/182146#M52525</link>
    <description>&lt;P&gt;Without it the search doesn't run at all. It was just a stretch to throw something in to make it return something.&lt;/P&gt;</description>
    <pubDate>Thu, 29 May 2014 16:46:32 GMT</pubDate>
    <dc:creator>CannonT</dc:creator>
    <dc:date>2014-05-29T16:46:32Z</dc:date>
    <item>
      <title>Can I resolve this Relative Time from Event Field error?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-resolve-this-Relative-Time-from-Event-Field-error/m-p/182143#M52522</link>
      <description>&lt;P&gt;I am trying to extract a field containing the date an event actually happened rather than the _time field because the data is coming from a csv and being entered much later. I want to use this new _time value to limit the search to a window of time that will later be defined by tokens given from a drop down box in the dashboard.&lt;/P&gt;
&lt;P&gt;The base search I am using returns the field data in _time correctly.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;index=test_index sourcetype=recipients OR sourcetype=opened
    | eval _time=strptime(eventDate, "%m/%d/%Y")  
    | table _time
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However, once relative time is added to the equation I get error: "No matching fields exist&lt;BR /&gt;[] Some events were removed by Timeliner because they were missing _time."&lt;BR /&gt;In addition to this the fields are merely put in descending order from the most recent time rather than being limited to the relative time range. Is there another way to do this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt; index=test_index sourcetype=recipients OR sourcetype=opened
    | eval _time=strptime(eventDate, "%m/%d/%Y") 
    | stats values(_time)
    | where _time&amp;gt;=relative_time(now(),"-1m") AND _time&amp;lt;=now()
    | table _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 Jan 2023 15:32:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-resolve-this-Relative-Time-from-Event-Field-error/m-p/182143#M52522</guid>
      <dc:creator>CannonT</dc:creator>
      <dc:date>2023-01-19T15:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: Relative Time from Event Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-resolve-this-Relative-Time-from-Event-Field-error/m-p/182144#M52523</link>
      <description>&lt;P&gt;Try using names other than _time while converting eventDate to epoch.&lt;/P&gt;</description>
      <pubDate>Thu, 29 May 2014 13:34:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-resolve-this-Relative-Time-from-Event-Field-error/m-p/182144#M52523</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-05-29T13:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: Relative Time from Event Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-resolve-this-Relative-Time-from-Event-Field-error/m-p/182145#M52524</link>
      <description>&lt;P&gt;Once you do &lt;CODE&gt;stats values(_time)&lt;/CODE&gt; the only field that will be available to the rest of the search pipeline is a multivalued field called "values(_time)", so the &lt;CODE&gt;where&lt;/CODE&gt; operation will fail. I'm not sure what the idea is with the stats command, so I'd suggest just removing it altogether.&lt;/P&gt;</description>
      <pubDate>Thu, 29 May 2014 16:37:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-resolve-this-Relative-Time-from-Event-Field-error/m-p/182145#M52524</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2014-05-29T16:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: Relative Time from Event Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-resolve-this-Relative-Time-from-Event-Field-error/m-p/182146#M52525</link>
      <description>&lt;P&gt;Without it the search doesn't run at all. It was just a stretch to throw something in to make it return something.&lt;/P&gt;</description>
      <pubDate>Thu, 29 May 2014 16:46:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-resolve-this-Relative-Time-from-Event-Field-error/m-p/182146#M52525</guid>
      <dc:creator>CannonT</dc:creator>
      <dc:date>2014-05-29T16:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Relative Time from Event Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-resolve-this-Relative-Time-from-Event-Field-error/m-p/182147#M52526</link>
      <description>&lt;P&gt;I tried converting to a time field then eval _time=time. The same thing happened with this as well.&lt;/P&gt;</description>
      <pubDate>Thu, 29 May 2014 16:49:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-resolve-this-Relative-Time-from-Event-Field-error/m-p/182147#M52526</guid>
      <dc:creator>CannonT</dc:creator>
      <dc:date>2014-05-29T16:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: Relative Time from Event Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-resolve-this-Relative-Time-from-Event-Field-error/m-p/182148#M52527</link>
      <description>&lt;P&gt;Ah. It might be that when you create fields starting with &lt;CODE&gt;_&lt;/CODE&gt; they are considered to be internal and therefore 'invisible' to the rest of the search pipeline. Try replacing your stats command with &lt;CODE&gt;eval time=_time&lt;/CODE&gt; and then perform your &lt;CODE&gt;eval&lt;/CODE&gt; and &lt;CODE&gt;where&lt;/CODE&gt; commands against &lt;CODE&gt;time&lt;/CODE&gt; instead of &lt;CODE&gt;_time&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 29 May 2014 17:40:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-resolve-this-Relative-Time-from-Event-Field-error/m-p/182148#M52527</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2014-05-29T17:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: Relative Time from Event Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-resolve-this-Relative-Time-from-Event-Field-error/m-p/182149#M52528</link>
      <description>&lt;P&gt;I'm still receiving no event or results from the search using a time variable instead of _time.&lt;/P&gt;</description>
      <pubDate>Thu, 29 May 2014 19:16:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-resolve-this-Relative-Time-from-Event-Field-error/m-p/182149#M52528</guid>
      <dc:creator>CannonT</dc:creator>
      <dc:date>2014-05-29T19:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Relative Time from Event Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-resolve-this-Relative-Time-from-Event-Field-error/m-p/627537#M218059</link>
      <description>&lt;P&gt;I encountered this same issue and came to the conclusion that Splunk only accepts epoch time formats for the _time field. If I eval _time to a value matching epoch time format, it produces the expected results without the error.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 02:35:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-resolve-this-Relative-Time-from-Event-Field-error/m-p/627537#M218059</guid>
      <dc:creator>kplante</dc:creator>
      <dc:date>2023-01-19T02:35:53Z</dc:date>
    </item>
  </channel>
</rss>

