<?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 dates in my search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-dates-in-my-search/m-p/600549#M209061</link>
    <description>&lt;P&gt;Sorry team to bother you again, i have a code that is giving me issues&lt;/P&gt;
&lt;P&gt;| eval InT = (strptime('LastPickupDate',"%m-%d-%Y %H:%M:%S")) + (('DaysOfARVRefil'+ 28)*86400)&lt;/P&gt;
&lt;P&gt;| stats list(InT) by FacilityName&lt;/P&gt;
&lt;P&gt;but the column InT is all blank, again how do i convert InT back to readable date and list them by facility names&amp;nbsp;&lt;/P&gt;
&lt;P&gt;many thanks&lt;/P&gt;
&lt;P&gt;osita&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jun 2022 03:34:05 GMT</pubDate>
    <dc:creator>ositaumeozulu</dc:creator>
    <dc:date>2022-06-06T03:34:05Z</dc:date>
    <item>
      <title>How to calculate dates in my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-dates-in-my-search/m-p/600549#M209061</link>
      <description>&lt;P&gt;Sorry team to bother you again, i have a code that is giving me issues&lt;/P&gt;
&lt;P&gt;| eval InT = (strptime('LastPickupDate',"%m-%d-%Y %H:%M:%S")) + (('DaysOfARVRefil'+ 28)*86400)&lt;/P&gt;
&lt;P&gt;| stats list(InT) by FacilityName&lt;/P&gt;
&lt;P&gt;but the column InT is all blank, again how do i convert InT back to readable date and list them by facility names&amp;nbsp;&lt;/P&gt;
&lt;P&gt;many thanks&lt;/P&gt;
&lt;P&gt;osita&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 03:34:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-dates-in-my-search/m-p/600549#M209061</guid>
      <dc:creator>ositaumeozulu</dc:creator>
      <dc:date>2022-06-06T03:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: issues with calculating dates</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-dates-in-my-search/m-p/600550#M209062</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/245944"&gt;@ositaumeozulu&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;to have the InT date you could also use reletive_time() function (&lt;A href="https://docs.splunk.com/Documentation/SCS/current/SearchReference/DateandTimeFunctions" target="_blank"&gt;https://docs.splunk.com/Documentation/SCS/current/SearchReference/DateandTimeFunctions&lt;/A&gt;), nd anyway, you have to convert the epochtime of your calculation in Human Readable format.&lt;/P&gt;&lt;P&gt;something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval InT = strftime(relative_time(strptime('LastPickupDate',"%m-%d-%Y %H:%M:%S"),"+28d"),"%m-%d-%Y %H:%M:%S")&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jun 2022 06:31:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-dates-in-my-search/m-p/600550#M209062</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-06-04T06:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: issues with calculating dates</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-dates-in-my-search/m-p/600863#M209152</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;code not working, i keep getting blanks , i want to add days to a date and get my answer in date format&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 13:06:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-dates-in-my-search/m-p/600863#M209152</guid>
      <dc:creator>ositaumeozulu</dc:creator>
      <dc:date>2022-06-07T13:06:47Z</dc:date>
    </item>
  </channel>
</rss>

