<?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: How do I sum by strftime day? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-sum-by-strftime-day/m-p/24787#M4606</link>
    <description>&lt;P&gt;Try this - just use &lt;CODE&gt;n&lt;/CODE&gt; instead of &lt;CODE&gt;n_day&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval newTime = relative_time(_time, "-6h")
...
| eval n=strftime(newTime , "%Y/%m/%d-%T") 
| stats sum(GJ) as MaxDay BY n
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 08 Feb 2013 07:19:23 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2013-02-08T07:19:23Z</dc:date>
    <item>
      <title>How do I sum by strftime day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-sum-by-strftime-day/m-p/24786#M4605</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;A simple questions I think.......&lt;/P&gt;

&lt;P&gt;I'm moving my _time by 6 hours and creating newTime then using strftime to look at the results.&lt;/P&gt;

&lt;P&gt;I then want to sum GJ by day of the newTime/strftime and then find the max of this?&lt;/P&gt;

&lt;P&gt;This is the part of the search that isn't working&lt;/P&gt;

&lt;P&gt;eval newTime = relative_time(_time, "-6h")&lt;BR /&gt;&lt;BR /&gt;
| eval n=strftime(newTime , "%Y/%m/%d-%T") &lt;BR /&gt;
| stats sum(GJ) as MaxDay BY n_day&lt;/P&gt;

&lt;P&gt;Any help is appreciated&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:16:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-sum-by-strftime-day/m-p/24786#M4605</guid>
      <dc:creator>timmoammo</dc:creator>
      <dc:date>2020-09-28T13:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do I sum by strftime day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-sum-by-strftime-day/m-p/24787#M4606</link>
      <description>&lt;P&gt;Try this - just use &lt;CODE&gt;n&lt;/CODE&gt; instead of &lt;CODE&gt;n_day&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval newTime = relative_time(_time, "-6h")
...
| eval n=strftime(newTime , "%Y/%m/%d-%T") 
| stats sum(GJ) as MaxDay BY n
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Feb 2013 07:19:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-sum-by-strftime-day/m-p/24787#M4606</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-02-08T07:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do I sum by strftime day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-sum-by-strftime-day/m-p/24788#M4607</link>
      <description>&lt;P&gt;Thanks for response however this doesn't seem to work.&lt;/P&gt;

&lt;P&gt;The bit I'm struggling with is summing by day in the adjusted strftime.&lt;/P&gt;

&lt;P&gt;i.e. I want to sum the GJ by day (in STRFtime) and then get the max of this&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2013 05:53:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-sum-by-strftime-day/m-p/24788#M4607</guid>
      <dc:creator>timmoammo</dc:creator>
      <dc:date>2013-02-11T05:53:55Z</dc:date>
    </item>
  </channel>
</rss>

