<?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 Days Between Question in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Days-Between-Question/m-p/312988#M93692</link>
    <description>&lt;P&gt;I am trying to determine the days between a static date and current date&lt;/P&gt;

&lt;P&gt;in this query I added a the 2008r2 column with a static date - table Division Name OS _time | eval 2008r2="1/14/2020"|&lt;/P&gt;

&lt;P&gt;I was unable to use a previous eval statement on this, I assume I dont have that column formatted properly&lt;BR /&gt;
eval Days=round((2008r2(now(),"@d")-relative_time(2008r2,"@d"))/86400,0) &lt;/P&gt;</description>
    <pubDate>Wed, 05 Apr 2017 20:38:46 GMT</pubDate>
    <dc:creator>jhayIV</dc:creator>
    <dc:date>2017-04-05T20:38:46Z</dc:date>
    <item>
      <title>Days Between Question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Days-Between-Question/m-p/312988#M93692</link>
      <description>&lt;P&gt;I am trying to determine the days between a static date and current date&lt;/P&gt;

&lt;P&gt;in this query I added a the 2008r2 column with a static date - table Division Name OS _time | eval 2008r2="1/14/2020"|&lt;/P&gt;

&lt;P&gt;I was unable to use a previous eval statement on this, I assume I dont have that column formatted properly&lt;BR /&gt;
eval Days=round((2008r2(now(),"@d")-relative_time(2008r2,"@d"))/86400,0) &lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2017 20:38:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Days-Between-Question/m-p/312988#M93692</guid>
      <dc:creator>jhayIV</dc:creator>
      <dc:date>2017-04-05T20:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: Days Between Question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Days-Between-Question/m-p/312989#M93693</link>
      <description>&lt;P&gt;We need to see sample event data and your full search.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2017 20:55:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Days-Between-Question/m-p/312989#M93693</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-04-05T20:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: Days Between Question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Days-Between-Question/m-p/312990#M93694</link>
      <description>&lt;P&gt;Use like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...table Division Name OS _time | eval 2008r2="1/14/2020"| eval Days=round((relative_time(now(),"@d")-relative_time(strptime('2008r2',"%m/%d/%Y"),"@d"))/86400,0) 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Basically, you need to convert your string date to epoch format so that you can do mathematical operation with current time now() which is in epoch. (the relative_time function also only accepts epoch value).&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2017 21:15:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Days-Between-Question/m-p/312990#M93694</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-04-05T21:15:02Z</dc:date>
    </item>
  </channel>
</rss>

