<?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: get latest record based on custom time field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/get-latest-record-based-on-custom-time-field/m-p/310163#M93046</link>
    <description>&lt;P&gt;Try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your current search giving fields Id UpdateTime Description AssignedTo
| eval _time=strptime(UpdateTime,"%m/%d/%y") 
| sort 0 -_time | dedup Id
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 12 Jul 2017 14:06:38 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2017-07-12T14:06:38Z</dc:date>
    <item>
      <title>get latest record based on custom time field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-latest-record-based-on-custom-time-field/m-p/310162#M93045</link>
      <description>&lt;P&gt;I have a excel input having columns-&amp;gt; Id,  UpdateTime, Desription, AssignedTo, StartTime&lt;BR /&gt;
having Values like&lt;/P&gt;

&lt;P&gt;Id       UpdateTime    Description    AssignedTo&lt;BR /&gt;
1          7/12/17 4:00    XYZ                   Sam&lt;BR /&gt;
1          7/12/17 8:00    XYZ                   Tom&lt;BR /&gt;
2          7/12/17 4:00    ABC                   Dan&lt;BR /&gt;
2          7/12/17 8:00    ABC                   Kaly&lt;/P&gt;

&lt;P&gt;result should be:&lt;BR /&gt;
Id       UpdateTime    Description    AssignedTo&lt;BR /&gt;
1          7/12/17 8:00    XYZ                   Tom&lt;BR /&gt;
2          7/12/17 8:00    ABC                   Kaly&lt;/P&gt;

&lt;P&gt;I need to fetch the latest record of each Id as per UpdateTime. &lt;BR /&gt;
'StartTime' field is already _time in existing query serving other purpose.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 07:06:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-latest-record-based-on-custom-time-field/m-p/310162#M93045</guid>
      <dc:creator>dsiob</dc:creator>
      <dc:date>2017-07-12T07:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: get latest record based on custom time field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-latest-record-based-on-custom-time-field/m-p/310163#M93046</link>
      <description>&lt;P&gt;Try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your current search giving fields Id UpdateTime Description AssignedTo
| eval _time=strptime(UpdateTime,"%m/%d/%y") 
| sort 0 -_time | dedup Id
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Jul 2017 14:06:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-latest-record-based-on-custom-time-field/m-p/310163#M93046</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-07-12T14:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: get latest record based on custom time field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-latest-record-based-on-custom-time-field/m-p/310164#M93047</link>
      <description>&lt;P&gt;I did it like this :&lt;/P&gt;

&lt;P&gt;current search here &lt;BR /&gt;
| sort -Id, -UpdateDateTime&lt;BR /&gt;
| dedup Id&lt;BR /&gt;
| table Id UpdateTime Description AssignedTo &lt;/P&gt;

&lt;P&gt;it's working.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2017 14:44:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-latest-record-based-on-custom-time-field/m-p/310164#M93047</guid>
      <dc:creator>dsiob</dc:creator>
      <dc:date>2017-07-14T14:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: get latest record based on custom time field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-latest-record-based-on-custom-time-field/m-p/310165#M93048</link>
      <description>&lt;P&gt;thanks someonei2 for reply&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2017 14:45:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-latest-record-based-on-custom-time-field/m-p/310165#M93048</guid>
      <dc:creator>dsiob</dc:creator>
      <dc:date>2017-07-14T14:45:40Z</dc:date>
    </item>
  </channel>
</rss>

