<?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 How do I calculate the difference between these two dates that are not in _time ? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-calculate-the-difference-between-these-two-dates-that/m-p/385794#M69276</link>
    <description>&lt;P&gt;Hi splunkers!&lt;/P&gt;

&lt;P&gt;I have tried to calculate the difference between these two dates (Date Closed) - (Date Created) using eval's  , but it's still not working.&lt;/P&gt;

&lt;P&gt;I tried to use timestamp as well and I didn't have the results that I want to.&lt;/P&gt;

&lt;P&gt;PS** These two fields are not in _time I uploaded the data base as CSV just like in Excel, both are recognized by splunk as strings.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7098iE902CAA9E0BFFC3F/image-size/large?v=v2&amp;amp;px=999" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 23 May 2019 14:29:26 GMT</pubDate>
    <dc:creator>lucasdc</dc:creator>
    <dc:date>2019-05-23T14:29:26Z</dc:date>
    <item>
      <title>How do I calculate the difference between these two dates that are not in _time ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-calculate-the-difference-between-these-two-dates-that/m-p/385794#M69276</link>
      <description>&lt;P&gt;Hi splunkers!&lt;/P&gt;

&lt;P&gt;I have tried to calculate the difference between these two dates (Date Closed) - (Date Created) using eval's  , but it's still not working.&lt;/P&gt;

&lt;P&gt;I tried to use timestamp as well and I didn't have the results that I want to.&lt;/P&gt;

&lt;P&gt;PS** These two fields are not in _time I uploaded the data base as CSV just like in Excel, both are recognized by splunk as strings.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7098iE902CAA9E0BFFC3F/image-size/large?v=v2&amp;amp;px=999" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2019 14:29:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-calculate-the-difference-between-these-two-dates-that/m-p/385794#M69276</guid>
      <dc:creator>lucasdc</dc:creator>
      <dc:date>2019-05-23T14:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do I calculate the difference between these two dates that are not in _time ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-calculate-the-difference-between-these-two-dates-that/m-p/385795#M69277</link>
      <description>&lt;P&gt;Please find attached&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|makeresults 
| eval Date_Created="25/3/19 14:45" | eval Date_Closed="3/5/19 15:50" 
| eval Date_Created=strptime(Date_Created,"%e/%m/%y %H:%M")
| eval Date_Closed=strptime(Date_Closed,"%e/%m/%y %H:%M")
| eval timeDiff_secs=Date_Closed-Date_Created
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Logic is to convert to epoch time and subtract&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2019 14:39:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-calculate-the-difference-between-these-two-dates-that/m-p/385795#M69277</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2019-05-23T14:39:12Z</dc:date>
    </item>
  </channel>
</rss>

