<?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: How do you get the latest time entry from a datetime field value? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-get-the-latest-time-entry-from-a-datetime-field-value/m-p/383574#M69067</link>
    <description>&lt;P&gt;adding limit=1 will limit your results to 1 date and useother=0 will stop it from grouping everything else into an 'other' category. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="ad_dns_new" sourcetype="resolve_json" 
| eval k=strptime(DateTime,"%Y-%m-%dT%H:%M:%S") 
| eval New_Date=strftime(k,"%d-%m-%Y %H:%M:%S") 
| table HealthCheck,Result,New_Date,Customer 
| sort - New_Date
| chart values(Result) as Result over HealthCheck by New_Date limit=1 useother=0
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 13 Nov 2018 17:53:39 GMT</pubDate>
    <dc:creator>kmaron</dc:creator>
    <dc:date>2018-11-13T17:53:39Z</dc:date>
    <item>
      <title>How do you get the latest time entry from a datetime field value?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-get-the-latest-time-entry-from-a-datetime-field-value/m-p/383573#M69066</link>
      <description>&lt;P&gt;I have one field value as a datetime field, and I want the data of only the latest time. How can I write this query? &lt;BR /&gt;
My current search is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="ad_dns_new" sourcetype="resolve_json"|eval k=strptime(DateTime,"%Y-%m-%dT%H:%M:%S")|eval New_Date=strftime(k,"%d-%m-%Y %H:%M:%S") | table HealthCheck,Result,New_Date,Customer|chart values(Result) as Result over HealthCheck by New_Date
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am attaching an image of my current output. From that, I want data of 11th nov 15:36:57. &lt;/P&gt;

&lt;P&gt;How can I do that? &lt;/P&gt;

&lt;P&gt;I look forward to hearing from you.&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/6076iB296EFAE1391A3B2/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Nov 2018 10:59:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-get-the-latest-time-entry-from-a-datetime-field-value/m-p/383573#M69066</guid>
      <dc:creator>darshana2511</dc:creator>
      <dc:date>2018-11-13T10:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get the latest time entry from a datetime field value?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-get-the-latest-time-entry-from-a-datetime-field-value/m-p/383574#M69067</link>
      <description>&lt;P&gt;adding limit=1 will limit your results to 1 date and useother=0 will stop it from grouping everything else into an 'other' category. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="ad_dns_new" sourcetype="resolve_json" 
| eval k=strptime(DateTime,"%Y-%m-%dT%H:%M:%S") 
| eval New_Date=strftime(k,"%d-%m-%Y %H:%M:%S") 
| table HealthCheck,Result,New_Date,Customer 
| sort - New_Date
| chart values(Result) as Result over HealthCheck by New_Date limit=1 useother=0
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Nov 2018 17:53:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-get-the-latest-time-entry-from-a-datetime-field-value/m-p/383574#M69067</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2018-11-13T17:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get the latest time entry from a datetime field value?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-get-the-latest-time-entry-from-a-datetime-field-value/m-p/383575#M69068</link>
      <description>&lt;P&gt;limit does not work with my query. as I have multiple date values as column names&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 14:51:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-get-the-latest-time-entry-from-a-datetime-field-value/m-p/383575#M69068</guid>
      <dc:creator>darshana2511</dc:creator>
      <dc:date>2018-11-14T14:51:47Z</dc:date>
    </item>
  </channel>
</rss>

