<?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: Difference between two dates in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Difference-between-two-dates/m-p/85800#M21905</link>
    <description>&lt;P&gt;For days you can do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...  | eval days = round((strptime(Enddate, "%F %T") - strptime(Startdate, "%F %T")) / 86400)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For years it depends on what you want to see.&lt;/P&gt;</description>
    <pubDate>Fri, 05 Apr 2013 10:40:36 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2013-04-05T10:40:36Z</dc:date>
    <item>
      <title>Difference between two dates</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Difference-between-two-dates/m-p/85799#M21904</link>
      <description>&lt;P&gt;I have a log that has &lt;BR /&gt;
Start date=2003-11-20 00:00:00,End date=2079-06-06 00:00:00.&lt;BR /&gt;
I want to calculate the difference between the Enddate and Startdate, and display the difference in both days and in years.&lt;/P&gt;

&lt;P&gt;Please help me &lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2013 10:17:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Difference-between-two-dates/m-p/85799#M21904</guid>
      <dc:creator>ncbshiva</dc:creator>
      <dc:date>2013-04-05T10:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two dates</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Difference-between-two-dates/m-p/85800#M21905</link>
      <description>&lt;P&gt;For days you can do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...  | eval days = round((strptime(Enddate, "%F %T") - strptime(Startdate, "%F %T")) / 86400)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For years it depends on what you want to see.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2013 10:40:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Difference-between-two-dates/m-p/85800#M21905</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-04-05T10:40:36Z</dc:date>
    </item>
  </channel>
</rss>

