<?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 Work out the duration between two fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Work-out-the-duration-between-two-fields/m-p/170478#M48774</link>
    <description>&lt;P&gt;Hi there.&lt;BR /&gt;
I basically have a data set with Support Cases in, i would like to find out the duration between the case being created (New) and the case being closed (Resolved).&lt;/P&gt;

&lt;P&gt;I have tried using eval/transaction and just cant get it to work.&lt;BR /&gt;
can anyone help? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 01 May 2015 15:23:14 GMT</pubDate>
    <dc:creator>gracemaher</dc:creator>
    <dc:date>2015-05-01T15:23:14Z</dc:date>
    <item>
      <title>Work out the duration between two fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Work-out-the-duration-between-two-fields/m-p/170478#M48774</link>
      <description>&lt;P&gt;Hi there.&lt;BR /&gt;
I basically have a data set with Support Cases in, i would like to find out the duration between the case being created (New) and the case being closed (Resolved).&lt;/P&gt;

&lt;P&gt;I have tried using eval/transaction and just cant get it to work.&lt;BR /&gt;
can anyone help? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2015 15:23:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Work-out-the-duration-between-two-fields/m-p/170478#M48774</guid>
      <dc:creator>gracemaher</dc:creator>
      <dc:date>2015-05-01T15:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Work out the duration between two fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Work-out-the-duration-between-two-fields/m-p/170479#M48775</link>
      <description>&lt;P&gt;Let's say the field that you were using in your transaction command is "CorrelationField" then this should work:&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
... | stats earliest(_time) AS first latest(_time) AS last by CorrelationField | eval duration=last-first&lt;BR /&gt;
&lt;/PRE&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:48:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Work-out-the-duration-between-two-fields/m-p/170479#M48775</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2020-09-28T19:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Work out the duration between two fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Work-out-the-duration-between-two-fields/m-p/170480#M48776</link>
      <description>&lt;P&gt;try &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...| transaction Field_name startswith="New" endswith="Resolved"|eval duration = duration|...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 May 2015 17:52:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Work-out-the-duration-between-two-fields/m-p/170480#M48776</guid>
      <dc:creator>fdi01</dc:creator>
      <dc:date>2015-05-01T17:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Work out the duration between two fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Work-out-the-duration-between-two-fields/m-p/170481#M48777</link>
      <description>&lt;P&gt;The first answer using "stats" (not using "transaction") will be more effective (the max_span, etc. values are infinite) and also MUCH more efficient (quicker to run).&lt;/P&gt;</description>
      <pubDate>Sat, 02 May 2015 01:37:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Work-out-the-duration-between-two-fields/m-p/170481#M48777</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-05-02T01:37:05Z</dc:date>
    </item>
  </channel>
</rss>

