<?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: Trying to get the correct format for start and end time in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Trying-to-get-the-correct-format-for-start-and-end-time/m-p/505775#M2142</link>
    <description>&lt;P&gt;Hi Anil,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the help. It gave the desired output for the time format.&lt;/P&gt;&lt;P&gt;However, if i remove the stats command to remove the duplicates of time... most of my data is missing with either start time or end time.&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;start time&lt;/TD&gt;&lt;TD width="50%"&gt;end time&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;6:55:53&lt;/TD&gt;&lt;TD width="50%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;6:55:33&lt;/TD&gt;&lt;TD width="50%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="50%"&gt;6:55:32&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;6:54:49&lt;/TD&gt;&lt;TD width="50%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;6:54:48&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where as if i keep the stats command I see the result where some of the time is showing multiple events.&lt;/P&gt;&lt;P&gt;ex.&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%"&gt;8:40:42&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;8:40:42&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jun 2020 16:35:07 GMT</pubDate>
    <dc:creator>chinmay25</dc:creator>
    <dc:date>2020-06-23T16:35:07Z</dc:date>
    <item>
      <title>Trying to get the correct format for start and end time</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Trying-to-get-the-correct-format-for-start-and-end-time/m-p/505612#M2123</link>
      <description>&lt;P&gt;I am working with the following query....however, the start time and end tied output that i am getting is below and some of the times is listed several times.&lt;/P&gt;&lt;P&gt;06/22/2020 15:24:06.370000&lt;/P&gt;&lt;P&gt;I am trying to get only the time instead of the current format.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;index= XYZ&amp;nbsp; SMF30JBN=M*DDD* SMF30JNM=JOB* (SMF30STP=1 OR SMF30STP=5) sourcetype="syncsort:smf030"&lt;BR /&gt;| rename SMF30JNM as JOBNUMBER SMF30JBN as JOBNAME&lt;BR /&gt;| eval START = case(SMF30STP=1,strptime(DATETIME, "%Y-%m-%d %H:%M:%S.%2N"))&lt;BR /&gt;| eval END = case(SMF30STP=5,strptime(DATETIME, "%Y-%m-%d %H:%M:%S.%2N"))&lt;BR /&gt;| stats values(START) as START values(END) as END by JOBNUMBER JOBNAME&lt;BR /&gt;| convert dur2sec(START) as STARTTIME dur2sec(END) as ENDTIME&lt;BR /&gt;| convert ctime(STARTTIME) as START_TIME ctime(ENDTIME) as END_TIME&lt;BR /&gt;| table JOBNAME START_TIME END_TIME&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 20:56:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Trying-to-get-the-correct-format-for-start-and-end-time/m-p/505612#M2123</guid>
      <dc:creator>chinmay25</dc:creator>
      <dc:date>2020-06-22T20:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to get the correct format for start and end time</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Trying-to-get-the-correct-format-for-start-and-end-time/m-p/505614#M2124</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/63444"&gt;@chinmay25&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;one solution would be using the below command instead of convert&lt;/P&gt;&lt;P&gt;| eval START_TIME=strftime(&lt;SPAN&gt;START&amp;nbsp;, "%H:%M:%S),&amp;nbsp; END_TIME=strftime(END , "%H:%M:%S)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;| table&amp;nbsp;JOBNAME START_TIME END_TIME&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The multiple values are due to the below command&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;| stats values(START) as START values(END) as END by JOBNUMBER JOBNAME&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 21:42:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Trying-to-get-the-correct-format-for-start-and-end-time/m-p/505614#M2124</guid>
      <dc:creator>anilchaithu</dc:creator>
      <dc:date>2020-06-22T21:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to get the correct format for start and end time</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Trying-to-get-the-correct-format-for-start-and-end-time/m-p/505775#M2142</link>
      <description>&lt;P&gt;Hi Anil,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the help. It gave the desired output for the time format.&lt;/P&gt;&lt;P&gt;However, if i remove the stats command to remove the duplicates of time... most of my data is missing with either start time or end time.&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;start time&lt;/TD&gt;&lt;TD width="50%"&gt;end time&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;6:55:53&lt;/TD&gt;&lt;TD width="50%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;6:55:33&lt;/TD&gt;&lt;TD width="50%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="50%"&gt;6:55:32&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;6:54:49&lt;/TD&gt;&lt;TD width="50%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;6:54:48&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where as if i keep the stats command I see the result where some of the time is showing multiple events.&lt;/P&gt;&lt;P&gt;ex.&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%"&gt;8:40:42&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;8:40:42&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2020 16:35:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Trying-to-get-the-correct-format-for-start-and-end-time/m-p/505775#M2142</guid>
      <dc:creator>chinmay25</dc:creator>
      <dc:date>2020-06-23T16:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to get the correct format for start and end time</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Trying-to-get-the-correct-format-for-start-and-end-time/m-p/505778#M2144</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/63444"&gt;@chinmay25&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can use mvdedup after stats to remove duplicate values.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;eval START_TIME=mvdedup(START_TIME), END_TIME=mvdedup(END_TIME)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;also you can use list in place of values&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;| stats list(START) as START list(END) as END by JOBNUMBER JOBNAME&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;If this helps, upvote would be appreciated&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2020 16:53:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Trying-to-get-the-correct-format-for-start-and-end-time/m-p/505778#M2144</guid>
      <dc:creator>anilchaithu</dc:creator>
      <dc:date>2020-06-23T16:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to get the correct format for start and end time</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Trying-to-get-the-correct-format-for-start-and-end-time/m-p/505781#M2145</link>
      <description>&lt;P&gt;Hi Anil,&lt;/P&gt;&lt;P&gt;The latest suggestion didnt help. But thanks for the earlier helped and I will vote.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chinmay.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2020 17:11:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Trying-to-get-the-correct-format-for-start-and-end-time/m-p/505781#M2145</guid>
      <dc:creator>chinmay25</dc:creator>
      <dc:date>2020-06-23T17:11:42Z</dc:date>
    </item>
  </channel>
</rss>

