<?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 Dealing with Datetime in Splunk Henny! in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Dealing-with-Datetime-in-Splunk-Henny/m-p/549665#M155984</link>
    <description>&lt;P&gt;Hello respected members of the prestigious forum of Splunk&lt;BR /&gt;&lt;BR /&gt;I have been working with datetimes in splunk and it is making me insane... I am extracting the datetime of two separate events to later on subtract them, I have tried many ways to achieve this but I still dont have the results that I want... the format of datetime of the events look like this:&amp;nbsp; &lt;SPAN&gt;2020-07-28T09:42:33-06:00 I want to be able to have calculate difference in minutes between to events "join" by the field: error-code... Because of the way the system is configured the error "adult.mov" may appear twice or three times but I am only interested in the first time it appeared ... However, if this error has not appeared yet I want to record the current time instead... I am trying something like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval terrorXYU=if(match(_raw, "e_type_k"),datetime_c, null)
| eval terroradult.mov=if(match(_raw, "mov"),datetime_c, null)
| eval terroradult.mov= strptime(terroradult.mov,"%m/%d/%Y %H:%M:%S:%3N")
| eval terrorXYU= strptime(terrorXYU,"%m/%d/%Y %H:%M:%S:%3N")
| eval diff= terroradult.mov-terrorXYU&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but I get nothing ins return I have tried a most of the codes in other posts but no luck at all.. thank you for helping me indeed&lt;/P&gt;</description>
    <pubDate>Wed, 28 Apr 2021 17:08:02 GMT</pubDate>
    <dc:creator>andres91302</dc:creator>
    <dc:date>2021-04-28T17:08:02Z</dc:date>
    <item>
      <title>Dealing with Datetime in Splunk Henny!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dealing-with-Datetime-in-Splunk-Henny/m-p/549665#M155984</link>
      <description>&lt;P&gt;Hello respected members of the prestigious forum of Splunk&lt;BR /&gt;&lt;BR /&gt;I have been working with datetimes in splunk and it is making me insane... I am extracting the datetime of two separate events to later on subtract them, I have tried many ways to achieve this but I still dont have the results that I want... the format of datetime of the events look like this:&amp;nbsp; &lt;SPAN&gt;2020-07-28T09:42:33-06:00 I want to be able to have calculate difference in minutes between to events "join" by the field: error-code... Because of the way the system is configured the error "adult.mov" may appear twice or three times but I am only interested in the first time it appeared ... However, if this error has not appeared yet I want to record the current time instead... I am trying something like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval terrorXYU=if(match(_raw, "e_type_k"),datetime_c, null)
| eval terroradult.mov=if(match(_raw, "mov"),datetime_c, null)
| eval terroradult.mov= strptime(terroradult.mov,"%m/%d/%Y %H:%M:%S:%3N")
| eval terrorXYU= strptime(terrorXYU,"%m/%d/%Y %H:%M:%S:%3N")
| eval diff= terroradult.mov-terrorXYU&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but I get nothing ins return I have tried a most of the codes in other posts but no luck at all.. thank you for helping me indeed&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 17:08:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dealing-with-Datetime-in-Splunk-Henny/m-p/549665#M155984</guid>
      <dc:creator>andres91302</dc:creator>
      <dc:date>2021-04-28T17:08:02Z</dc:date>
    </item>
  </channel>
</rss>

