<?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: To find number of days between two dates in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/To-find-number-of-days-between-two-dates/m-p/56216#M13744</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;...| eval start = strptime(date1, "%Y-%m-%d %H:%M:%S")| eval end = strptime(date2, "%Y-%m-%d %H:%M:%S")| eval duration = round((end-start)/86400)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Converts column to timestamp(epoc):     strptime(field, date_format)&lt;BR /&gt;
This will give you the duration in days (example):      23&lt;/P&gt;</description>
    <pubDate>Fri, 08 Jul 2016 20:42:01 GMT</pubDate>
    <dc:creator>singhh4</dc:creator>
    <dc:date>2016-07-08T20:42:01Z</dc:date>
    <item>
      <title>To find number of days between two dates</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-find-number-of-days-between-two-dates/m-p/56209#M13737</link>
      <description>&lt;P&gt;Please give a solution to calculate the number of days between two given dates..&lt;/P&gt;

&lt;P&gt;Regards&lt;BR /&gt;
Govind.&lt;/P&gt;</description>
      <pubDate>Mon, 21 May 2012 02:52:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-find-number-of-days-between-two-dates/m-p/56209#M13737</guid>
      <dc:creator>jgr_26</dc:creator>
      <dc:date>2012-05-21T02:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: To find number of days between two dates</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-find-number-of-days-between-two-dates/m-p/56210#M13738</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;... | eval (timestamp2-timestamp1)/86400
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;is whatI can do with the information you've given.&lt;/P&gt;</description>
      <pubDate>Mon, 21 May 2012 05:15:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-find-number-of-days-between-two-dates/m-p/56210#M13738</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2012-05-21T05:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: To find number of days between two dates</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-find-number-of-days-between-two-dates/m-p/56211#M13739</link>
      <description>&lt;P&gt;You really need to provide more context on this, such as, where are these dates coming from?&lt;/P&gt;</description>
      <pubDate>Mon, 21 May 2012 05:16:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-find-number-of-days-between-two-dates/m-p/56211#M13739</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2012-05-21T05:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: To find number of days between two dates</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-find-number-of-days-between-two-dates/m-p/56212#M13740</link>
      <description>&lt;P&gt;i need to generate a time based report. Below are the inputs&lt;BR /&gt;
Start Date : string&lt;BR /&gt;
End Date  : string&lt;/P&gt;

&lt;P&gt;I need the no of days from ( now to startDate) and (now to endDate), so that i can play around.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 21 May 2012 15:23:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-find-number-of-days-between-two-dates/m-p/56212#M13740</guid>
      <dc:creator>jgr_26</dc:creator>
      <dc:date>2012-05-21T15:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: To find number of days between two dates</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-find-number-of-days-between-two-dates/m-p/56213#M13741</link>
      <description>&lt;P&gt;This is not working.... &lt;/P&gt;

&lt;P&gt;Here is my scenario... I have event coming in SPLUNK from database and i have 2 date columns in it. I need to get the difference between the 2 days and want to filter all records that are greater than 30 days.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2012 17:32:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-find-number-of-days-between-two-dates/m-p/56213#M13741</guid>
      <dc:creator>jebasinghk</dc:creator>
      <dc:date>2012-11-21T17:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: To find number of days between two dates</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-find-number-of-days-between-two-dates/m-p/56214#M13742</link>
      <description>&lt;P&gt;Ok, so what's not working with the provided solution?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2012 22:18:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-find-number-of-days-between-two-dates/m-p/56214#M13742</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-11-21T22:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: To find number of days between two dates</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-find-number-of-days-between-two-dates/m-p/56215#M13743</link>
      <description>&lt;P&gt;Hi , &lt;BR /&gt;
source="dmon-tail://idhouse/id_account" application=TFD [|inputlookup execSSO.csv |rename sso as owner] |eval exp_date=strftime(relative_time(strptime(lastPasswordChange,"%Y-%m-%d %H:%M:%S"),"+90d@d"), "%Y/%m/%d %H:%M")&lt;/P&gt;

&lt;P&gt;This  query is working good . &lt;/P&gt;

&lt;P&gt;I need one more help , &lt;/P&gt;

&lt;P&gt;I want to count the days between exp_date and today date&lt;/P&gt;

&lt;P&gt;any one can help me on this ...&lt;/P&gt;

&lt;P&gt;Thank u ,&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Siraj&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:45:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-find-number-of-days-between-two-dates/m-p/56215#M13743</guid>
      <dc:creator>siraj198204</dc:creator>
      <dc:date>2020-09-28T17:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: To find number of days between two dates</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-find-number-of-days-between-two-dates/m-p/56216#M13744</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;...| eval start = strptime(date1, "%Y-%m-%d %H:%M:%S")| eval end = strptime(date2, "%Y-%m-%d %H:%M:%S")| eval duration = round((end-start)/86400)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Converts column to timestamp(epoc):     strptime(field, date_format)&lt;BR /&gt;
This will give you the duration in days (example):      23&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2016 20:42:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-find-number-of-days-between-two-dates/m-p/56216#M13744</guid>
      <dc:creator>singhh4</dc:creator>
      <dc:date>2016-07-08T20:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: To find number of days between two dates</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-find-number-of-days-between-two-dates/m-p/56217#M13745</link>
      <description>&lt;P&gt;HI, Just a small question here: What if I want to remove the weekend from this calculation. &lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2018 07:43:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-find-number-of-days-between-two-dates/m-p/56217#M13745</guid>
      <dc:creator>Chandras11</dc:creator>
      <dc:date>2018-09-04T07:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: To find number of days between two dates</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-find-number-of-days-between-two-dates/m-p/56218#M13746</link>
      <description>&lt;P&gt;hi @Chandras11 &lt;/P&gt;

&lt;P&gt;have a look into this links:-&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/306182/how-to-exclude-weekends-saturday-and-sunday-from-a.html"&gt;https://answers.splunk.com/answers/306182/how-to-exclude-weekends-saturday-and-sunday-from-a.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/426673/how-to-filter-out-weekdays-or-weekends-in-one-sear.html"&gt;https://answers.splunk.com/answers/426673/how-to-filter-out-weekdays-or-weekends-in-one-sear.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2018 07:50:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-find-number-of-days-between-two-dates/m-p/56218#M13746</guid>
      <dc:creator>harishalipaka</dc:creator>
      <dc:date>2018-09-04T07:50:25Z</dc:date>
    </item>
  </channel>
</rss>

