<?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: Time difference between 2 fields in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Time-difference-between-2-fields/m-p/473627#M4726</link>
    <description>&lt;P&gt;Thankyou @skoelpin &lt;/P&gt;</description>
    <pubDate>Tue, 18 Feb 2020 15:02:12 GMT</pubDate>
    <dc:creator>nathanluke86</dc:creator>
    <dc:date>2020-02-18T15:02:12Z</dc:date>
    <item>
      <title>Time difference between 2 fields</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Time-difference-between-2-fields/m-p/473624#M4723</link>
      <description>&lt;P&gt;How can I get the time difference between two fields below&lt;/P&gt;

&lt;P&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/8406iB8D8E589689E81FD/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;TIA&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 14:15:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Time-difference-between-2-fields/m-p/473624#M4723</guid>
      <dc:creator>nathanluke86</dc:creator>
      <dc:date>2020-02-18T14:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: Time difference between 2 fields</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Time-difference-between-2-fields/m-p/473625#M4724</link>
      <description>&lt;P&gt;Like this.. This will convert your fields to epoch time, find the difference, then convert to hours/min/sec &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval time_epoch=strptime(time, "%m/%d/%y %H:%M:%S")
| eval timenow_epoch=strptime(timenow, "%m/%d/%y %H:%M:%S")
| eval diff=timenow_epoch-time_epoch
| eval diff=strftime(diff, "%H:%M:%S")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Feb 2020 14:53:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Time-difference-between-2-fields/m-p/473625#M4724</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2020-02-18T14:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: Time difference between 2 fields</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Time-difference-between-2-fields/m-p/473626#M4725</link>
      <description>&lt;P&gt;Use:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval time_diff = strptime(timenow, "%m/%d/%y %H:%M:%S") - strptime(time, "%m/%d/%y %H:%M:%S")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sample query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval time="02/18/20 12:00:45",  timenow="02/18/20 14:12:32" | eval time_diff = strptime(timenow, "%m/%d/%y %H:%M:%S") - strptime(time, "%m/%d/%y %H:%M:%S")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Feb 2020 14:54:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Time-difference-between-2-fields/m-p/473626#M4725</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-02-18T14:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: Time difference between 2 fields</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Time-difference-between-2-fields/m-p/473627#M4726</link>
      <description>&lt;P&gt;Thankyou @skoelpin &lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 15:02:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Time-difference-between-2-fields/m-p/473627#M4726</guid>
      <dc:creator>nathanluke86</dc:creator>
      <dc:date>2020-02-18T15:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: Time difference between 2 fields</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Time-difference-between-2-fields/m-p/473628#M4727</link>
      <description>&lt;P&gt;Thanks @manjunathmeti &lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 15:02:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Time-difference-between-2-fields/m-p/473628#M4727</guid>
      <dc:creator>nathanluke86</dc:creator>
      <dc:date>2020-02-18T15:02:32Z</dc:date>
    </item>
  </channel>
</rss>

