<?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 to calculate days between two dates and also how to calculate only business date? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-calculate-days-between-two-dates-and-also-how-to/m-p/435504#M170635</link>
    <description>&lt;P&gt;| eval duedate1 = strftime(strptime(duedate,"%Y-%m-%d"),"%Y-%m-%d %H:%M:%S")&lt;BR /&gt;
| eval current = strftime(now(),"%Y-%m-%d %H:%M:%S") &lt;BR /&gt;
| eval daysdiff=round((current-duedate1)/86400,0)&lt;BR /&gt;
| table   current duedate1 daysdiff&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jun 2019 06:02:00 GMT</pubDate>
    <dc:creator>chandanimishra</dc:creator>
    <dc:date>2019-06-20T06:02:00Z</dc:date>
    <item>
      <title>how to calculate days between two dates and also how to calculate only business date?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-calculate-days-between-two-dates-and-also-how-to/m-p/435504#M170635</link>
      <description>&lt;P&gt;| eval duedate1 = strftime(strptime(duedate,"%Y-%m-%d"),"%Y-%m-%d %H:%M:%S")&lt;BR /&gt;
| eval current = strftime(now(),"%Y-%m-%d %H:%M:%S") &lt;BR /&gt;
| eval daysdiff=round((current-duedate1)/86400,0)&lt;BR /&gt;
| table   current duedate1 daysdiff&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 06:02:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-calculate-days-between-two-dates-and-also-how-to/m-p/435504#M170635</guid>
      <dc:creator>chandanimishra</dc:creator>
      <dc:date>2019-06-20T06:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to calculate days between two dates and also how to calculate only business date?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-calculate-days-between-two-dates-and-also-how-to/m-p/435505#M170636</link>
      <description>&lt;P&gt;Differences between timestamps must be calculated using the epoch form of timestamp.  Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval duedate1 = strptime(duedate,"%Y-%m-%d")
| eval current = now()
| eval daysdiff=round((current-duedate1)/86400,0)
| eval today = strftime(current, "%Y-%m-%d %H:%M:%S")
| table today duedate daysdiff
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Jun 2019 12:58:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-calculate-days-between-two-dates-and-also-how-to/m-p/435505#M170636</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-06-20T12:58:28Z</dc:date>
    </item>
  </channel>
</rss>

