<?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: data is displayed by alphabetic order of the month name when using date_month to sort in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/data-is-displayed-by-alphabetic-order-of-the-month-name-when/m-p/83323#M21203</link>
    <description>&lt;P&gt;what if i want to use chart command instead of stats. then how do i arrange months in chronological order? &lt;BR /&gt;
Below is the query in which i want to arrange results by chronological order: &lt;BR /&gt;
.&lt;BR /&gt;
.....| eval month=strftime(strptime(UpdateDate,"%m/%d/%y %H:%M"),"%B")| chart sum(Effort) by month,date_year | sort month&lt;/P&gt;</description>
    <pubDate>Fri, 14 Apr 2017 07:38:08 GMT</pubDate>
    <dc:creator>lakshayanand</dc:creator>
    <dc:date>2017-04-14T07:38:08Z</dc:date>
    <item>
      <title>data is displayed by alphabetic order of the month name when using date_month to sort</title>
      <link>https://community.splunk.com/t5/Splunk-Search/data-is-displayed-by-alphabetic-order-of-the-month-name-when/m-p/83319#M21199</link>
      <description>&lt;P&gt;In 4.2.x, instead of June, July, August, September, the data listed as August, July, June, September. Data is displayed by alphabetic order of the month name.&lt;/P&gt;

&lt;P&gt;Data is displayed by alphabetic order of the month name when it should be logical.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;* |stats count as "Total Incident/month" by date_month 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;IMG src="http://splunk-base.splunk.com/splunk-sort.JPG" alt="alt text" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2011 22:01:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/data-is-displayed-by-alphabetic-order-of-the-month-name-when/m-p/83319#M21199</guid>
      <dc:creator>zliu</dc:creator>
      <dc:date>2011-09-28T22:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: data is displayed by alphabetic order of the month name when using date_month to sort</title>
      <link>https://community.splunk.com/t5/Splunk-Search/data-is-displayed-by-alphabetic-order-of-the-month-name-when/m-p/83320#M21200</link>
      <description>&lt;P&gt;This is a bug. Bug#SPL-43691&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2011 22:02:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/data-is-displayed-by-alphabetic-order-of-the-month-name-when/m-p/83320#M21200</guid>
      <dc:creator>zliu</dc:creator>
      <dc:date>2011-09-28T22:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: data is displayed by alphabetic order of the month name when using date_month to sort</title>
      <link>https://community.splunk.com/t5/Splunk-Search/data-is-displayed-by-alphabetic-order-of-the-month-name-when/m-p/83321#M21201</link>
      <description>&lt;P&gt;This is not a bug. If you do want to sort by month, then you can place the month number in a field and sort on that, e.g.:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval date_numericmonth=strftime(_time,"%m") | stats count by date_numericmonth
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 29 Sep 2011 03:30:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/data-is-displayed-by-alphabetic-order-of-the-month-name-when/m-p/83321#M21201</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2011-09-29T03:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: data is displayed by alphabetic order of the month name when using date_month to sort</title>
      <link>https://community.splunk.com/t5/Splunk-Search/data-is-displayed-by-alphabetic-order-of-the-month-name-when/m-p/83322#M21202</link>
      <description>&lt;P&gt;I would change something slightly with gkanapathy's answer. Prefix the date_numeric_month with an underscore to make it hidden and add the month name within the query.&lt;/P&gt;

&lt;P&gt;In this example I am getting the count of user_ids per month:&lt;/P&gt;

&lt;P&gt;... |  eval _date_numeric_month=strftime(_time,"%m") | stats count(user_id) by _date_numeric_month, date_month | sort _date_numeric_month &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 10:08:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/data-is-displayed-by-alphabetic-order-of-the-month-name-when/m-p/83322#M21202</guid>
      <dc:creator>ag</dc:creator>
      <dc:date>2020-09-28T10:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: data is displayed by alphabetic order of the month name when using date_month to sort</title>
      <link>https://community.splunk.com/t5/Splunk-Search/data-is-displayed-by-alphabetic-order-of-the-month-name-when/m-p/83323#M21203</link>
      <description>&lt;P&gt;what if i want to use chart command instead of stats. then how do i arrange months in chronological order? &lt;BR /&gt;
Below is the query in which i want to arrange results by chronological order: &lt;BR /&gt;
.&lt;BR /&gt;
.....| eval month=strftime(strptime(UpdateDate,"%m/%d/%y %H:%M"),"%B")| chart sum(Effort) by month,date_year | sort month&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 07:38:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/data-is-displayed-by-alphabetic-order-of-the-month-name-when/m-p/83323#M21203</guid>
      <dc:creator>lakshayanand</dc:creator>
      <dc:date>2017-04-14T07:38:08Z</dc:date>
    </item>
  </channel>
</rss>

