<?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 to substract two fields on epoch in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-substract-two-fields-on-epoch/m-p/562864#M100296</link>
    <description>&lt;P&gt;I didn't know the "makeresults" command. Seems easier to check with this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On my side, my request is a bit more complicated but in the end, my "diff" column was still empty with this exact command |eval difference=end-start.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Table_Diff.png" style="width: 620px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/15514iC201DE577D31D5B0/image-dimensions/620x216?v=v2" width="620" height="216" role="button" title="Table_Diff.png" alt="Table_Diff.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;With your confirmation that the request was working correctly, I found the solution and it was a simple mistake...&lt;/P&gt;&lt;P&gt;My "eval" command was before the "table" command and couldn't work.&lt;/P&gt;&lt;P&gt;I changed the order and now it's working perfectly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It wasn't so much but thanks, it helps me a lot to clear my mind &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Aug 2021 07:14:02 GMT</pubDate>
    <dc:creator>Emp</dc:creator>
    <dc:date>2021-08-11T07:14:02Z</dc:date>
    <item>
      <title>How to substract two fields on epoch</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-substract-two-fields-on-epoch/m-p/562756#M100281</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I tried to find answers on the forum but I didn't find any working solutions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had two fields with "hour / minute / second" like:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TReceived &amp;gt; 17:13:10&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TSent &amp;gt; 17:12:20&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to substract TSent from TReceived and put it into a table.&lt;/P&gt;&lt;P&gt;I did something like :&lt;/P&gt;&lt;P&gt;| eval&amp;nbsp;start=strptime(TSent, "%H:%M:%S.%N"), end=strptime(TReceived, "%H:%M:%S.%N")&lt;/P&gt;&lt;P&gt;| eval difference=end-start&lt;/P&gt;&lt;P&gt;|table end,start,difference&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a result, I correctly have something on the "end" and "star" column but "difference" stays empty.&lt;/P&gt;&lt;P&gt;Am I missing something?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 15:32:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-substract-two-fields-on-epoch/m-p/562756#M100281</guid>
      <dc:creator>Emp</dc:creator>
      <dc:date>2021-08-10T15:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to substract two fields on epoch</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-substract-two-fields-on-epoch/m-p/562759#M100282</link>
      <description>&lt;P&gt;Your query is working.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval TReceived="17:13:10", TSent="17:12:20" 
| eval start=strptime(TSent, "%H:%M:%S.%N"), end=strptime(TReceived, "%H:%M:%S.%N") 
| eval difference=end-start 
| table end,start,difference&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 15:37:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-substract-two-fields-on-epoch/m-p/562759#M100282</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2021-08-10T15:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to substract two fields on epoch</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-substract-two-fields-on-epoch/m-p/562864#M100296</link>
      <description>&lt;P&gt;I didn't know the "makeresults" command. Seems easier to check with this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On my side, my request is a bit more complicated but in the end, my "diff" column was still empty with this exact command |eval difference=end-start.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Table_Diff.png" style="width: 620px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/15514iC201DE577D31D5B0/image-dimensions/620x216?v=v2" width="620" height="216" role="button" title="Table_Diff.png" alt="Table_Diff.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;With your confirmation that the request was working correctly, I found the solution and it was a simple mistake...&lt;/P&gt;&lt;P&gt;My "eval" command was before the "table" command and couldn't work.&lt;/P&gt;&lt;P&gt;I changed the order and now it's working perfectly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It wasn't so much but thanks, it helps me a lot to clear my mind &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Aug 2021 07:14:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-substract-two-fields-on-epoch/m-p/562864#M100296</guid>
      <dc:creator>Emp</dc:creator>
      <dc:date>2021-08-11T07:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to substract two fields on epoch</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-substract-two-fields-on-epoch/m-p/562869#M100297</link>
      <description>&lt;P&gt;You're welcome!&amp;nbsp;&lt;SPAN&gt;I'm glad it helped&lt;/SPAN&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Aug 2021 07:50:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-substract-two-fields-on-epoch/m-p/562869#M100297</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2021-08-11T07:50:30Z</dc:date>
    </item>
  </channel>
</rss>

