<?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: Find time differences between two extracted fields in the format HH:MM:SS in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Find-time-differences-between-two-extracted-fields-in-the-format/m-p/172834#M49567</link>
    <description>&lt;P&gt;To get the duration in the new field &lt;CODE&gt;dur&lt;/CODE&gt;;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...| eval st=strptime(start_time, "%H:%M:%S") | eval et=strptime(end_time,"%H:%M:%S") | eval diff = et - st | eval dur = tostring(diff, "duration")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Read more on &lt;CODE&gt;eval&lt;/CODE&gt; functions here;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/CommonEvalFunctions"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/CommonEvalFunctions&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
    <pubDate>Mon, 09 Dec 2013 23:46:13 GMT</pubDate>
    <dc:creator>kristian_kolb</dc:creator>
    <dc:date>2013-12-09T23:46:13Z</dc:date>
    <item>
      <title>Find time differences between two extracted fields in the format HH:MM:SS</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Find-time-differences-between-two-extracted-fields-in-the-format/m-p/172833#M49566</link>
      <description>&lt;P&gt;I have two fields in a single search row.  start_time and end_time.  they are both in the format HH:MM:SS.  I'd like to calculate the duration end_time - start_time and have the results in the same format HH:MM:SS.&lt;/P&gt;

&lt;P&gt;thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:27:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Find-time-differences-between-two-extracted-fields-in-the-format/m-p/172833#M49566</guid>
      <dc:creator>krussell101</dc:creator>
      <dc:date>2020-09-28T15:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: Find time differences between two extracted fields in the format HH:MM:SS</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Find-time-differences-between-two-extracted-fields-in-the-format/m-p/172834#M49567</link>
      <description>&lt;P&gt;To get the duration in the new field &lt;CODE&gt;dur&lt;/CODE&gt;;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...| eval st=strptime(start_time, "%H:%M:%S") | eval et=strptime(end_time,"%H:%M:%S") | eval diff = et - st | eval dur = tostring(diff, "duration")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Read more on &lt;CODE&gt;eval&lt;/CODE&gt; functions here;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/CommonEvalFunctions"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/CommonEvalFunctions&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2013 23:46:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Find-time-differences-between-two-extracted-fields-in-the-format/m-p/172834#M49567</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-12-09T23:46:13Z</dc:date>
    </item>
  </channel>
</rss>

