<?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 display the date in my report  with the the data ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-display-the-date-in-my-report-with-the-the-data/m-p/495106#M138043</link>
    <description>&lt;P&gt;Try this,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="x" name = "any" | bin _time span=1s | stats count by logtime | eventstats max(count) as count | eval date=strftime(now()-86400, "%d-%m-%Y")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 12 Mar 2020 12:38:29 GMT</pubDate>
    <dc:creator>manjunathmeti</dc:creator>
    <dc:date>2020-03-12T12:38:29Z</dc:date>
    <item>
      <title>How do I display the date in my report  with the the data ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-display-the-date-in-my-report-with-the-the-data/m-p/495104#M138041</link>
      <description>&lt;P&gt;I am trying get the max count for the yesterday's but along with this i need to display the date in the report for yesterdays date? &lt;BR /&gt;
Kindly help me to get the date in the results along with the existing results. &lt;/P&gt;

&lt;P&gt;Query: &lt;STRONG&gt;sourcetype="x" name = "any" | bin _time  span=1s | stats count by logtime | stats max(count)&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Output for the above query is : &lt;BR /&gt;
max(count)&lt;BR /&gt;
34&lt;/P&gt;

&lt;P&gt;Thanks In Advance&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 10:20:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-display-the-date-in-my-report-with-the-the-data/m-p/495104#M138041</guid>
      <dc:creator>pradeepk50</dc:creator>
      <dc:date>2020-03-12T10:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do I display the date in my report  with the the data ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-display-the-date-in-my-report-with-the-the-data/m-p/495105#M138042</link>
      <description>&lt;P&gt;The &lt;CODE&gt;stats&lt;/CODE&gt; command filters out all fields except those explicitly named in the command so _time is not available.  Depending on the time window of your search, this may fill your needs.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="x" name = "any" | bin _time span=1s | stats count by logtime 
| stats max(count) as MaxCount 
| eval Date = strftime(now(), "%F")
| table Date MaxCount
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Mar 2020 12:37:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-display-the-date-in-my-report-with-the-the-data/m-p/495105#M138042</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-03-12T12:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I display the date in my report  with the the data ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-display-the-date-in-my-report-with-the-the-data/m-p/495106#M138043</link>
      <description>&lt;P&gt;Try this,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="x" name = "any" | bin _time span=1s | stats count by logtime | eventstats max(count) as count | eval date=strftime(now()-86400, "%d-%m-%Y")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Mar 2020 12:38:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-display-the-date-in-my-report-with-the-the-data/m-p/495106#M138043</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-03-12T12:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do I display the date in my report  with the the data ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-display-the-date-in-my-report-with-the-the-data/m-p/495107#M138044</link>
      <description>&lt;P&gt;Perfect &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;

&lt;P&gt;so to get the date field this is the syntax " | eval Date = strftime(now(), "%F")" right ?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 15:23:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-display-the-date-in-my-report-with-the-the-data/m-p/495107#M138044</guid>
      <dc:creator>pradeepk50</dc:creator>
      <dc:date>2020-03-12T15:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I display the date in my report  with the the data ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-display-the-date-in-my-report-with-the-the-data/m-p/495108#M138045</link>
      <description>&lt;P&gt;by this i am getting count for that interval. Actually i am looking for complete day Max count with the date incorporated in that. &lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 15:25:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-display-the-date-in-my-report-with-the-the-data/m-p/495108#M138045</guid>
      <dc:creator>pradeepk50</dc:creator>
      <dc:date>2020-03-12T15:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: How do I display the date in my report  with the the data ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-display-the-date-in-my-report-with-the-the-data/m-p/495109#M138046</link>
      <description>&lt;P&gt;what are logtime values?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 15:30:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-display-the-date-in-my-report-with-the-the-data/m-p/495109#M138046</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-03-12T15:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do I display the date in my report  with the the data ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-display-the-date-in-my-report-with-the-the-data/m-p/495110#M138047</link>
      <description>&lt;P&gt;Its like &lt;/P&gt;

&lt;P&gt;logtime&lt;BR /&gt;
for todays date and time --&amp;gt; the count will get displayed. &lt;/P&gt;

&lt;P&gt;Like below &lt;BR /&gt;
logtime count&lt;BR /&gt;
2020-03-11 19:38:42 34&lt;BR /&gt;
2020-03-11 17:30:53 29&lt;BR /&gt;
2020-03-11 19:17:02 29&lt;BR /&gt;
2020-03-11 17:17:36 28&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 15:55:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-display-the-date-in-my-report-with-the-the-data/m-p/495110#M138047</guid>
      <dc:creator>pradeepk50</dc:creator>
      <dc:date>2020-03-12T15:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do I display the date in my report  with the the data ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-display-the-date-in-my-report-with-the-the-data/m-p/495111#M138048</link>
      <description>&lt;P&gt;Right.  That will get you the current date as a string.  Modify the second argument to &lt;CODE&gt;strftime&lt;/CODE&gt; if you want the date in a different format.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 16:57:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-display-the-date-in-my-report-with-the-the-data/m-p/495111#M138048</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-03-12T16:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do I display the date in my report  with the the data ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-display-the-date-in-my-report-with-the-the-data/m-p/495112#M138049</link>
      <description>&lt;P&gt;ok, you can use stats in place of eventstats. And you wrote need to display the date in the report for yesterdays date. Replace now()-86400 with now() if you don't want yesterdays date.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="x" name = "any" | bin _time span=1s | stats count by logtime | stats max(count) as max_count | eval date=strftime(now()-86400, "%d-%m-%Y") | table date, max_count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Mar 2020 17:49:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-display-the-date-in-my-report-with-the-the-data/m-p/495112#M138049</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-03-12T17:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do I display the date in my report  with the the data ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-display-the-date-in-my-report-with-the-the-data/m-p/495113#M138050</link>
      <description>&lt;P&gt;By the above query i am getting the date filed in  the results but its getting today's date, but the report is running for yesterday's data. So we need to display yesterday's date. &lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 05:09:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-display-the-date-in-my-report-with-the-the-data/m-p/495113#M138050</guid>
      <dc:creator>pradeepk50</dc:creator>
      <dc:date>2020-03-13T05:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I display the date in my report  with the the data ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-display-the-date-in-my-report-with-the-the-data/m-p/495114#M138051</link>
      <description>&lt;P&gt;Yeah, this is working as expected.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 05:15:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-display-the-date-in-my-report-with-the-the-data/m-p/495114#M138051</guid>
      <dc:creator>pradeepk50</dc:creator>
      <dc:date>2020-03-13T05:15:04Z</dc:date>
    </item>
  </channel>
</rss>

