<?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 date sorting numerically not alphabetically in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/date-sorting-numerically-not-alphabetically/m-p/24907#M4641</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;We have the following search in a chart but the dates are sorting alphabetically rather than numerically. ie Aug 1, Aug 2, Jul 29, Jul 30 and not Jul 29, Jul 30, Aug 1, Aug 2.&lt;/P&gt;

&lt;P&gt;index=reporter | dedup TKT_NUMBER | eval time=strftime(_time, "%b %d") | bucket time span=1d | chart count over NOTIFY_GROUP by time useother=f | rename NOTIFY_GROUP AS Group &lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 14:30:08 GMT</pubDate>
    <dc:creator>aaronkorn</dc:creator>
    <dc:date>2020-09-28T14:30:08Z</dc:date>
    <item>
      <title>date sorting numerically not alphabetically</title>
      <link>https://community.splunk.com/t5/Splunk-Search/date-sorting-numerically-not-alphabetically/m-p/24907#M4641</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;We have the following search in a chart but the dates are sorting alphabetically rather than numerically. ie Aug 1, Aug 2, Jul 29, Jul 30 and not Jul 29, Jul 30, Aug 1, Aug 2.&lt;/P&gt;

&lt;P&gt;index=reporter | dedup TKT_NUMBER | eval time=strftime(_time, "%b %d") | bucket time span=1d | chart count over NOTIFY_GROUP by time useother=f | rename NOTIFY_GROUP AS Group &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:30:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/date-sorting-numerically-not-alphabetically/m-p/24907#M4641</guid>
      <dc:creator>aaronkorn</dc:creator>
      <dc:date>2020-09-28T14:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: date sorting numerically not alphabetically</title>
      <link>https://community.splunk.com/t5/Splunk-Search/date-sorting-numerically-not-alphabetically/m-p/24908#M4642</link>
      <description>&lt;P&gt;That's because you're sorting by an alphanumeric field - Splunk doesn't know what the string you're sorting by represents. It's a better idea to sort by &lt;CODE&gt;_time&lt;/CODE&gt; but have it display as something more human readable.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=reporter | dedup TKT_NUMBER | bucket _time span=1d | chart count over NOTIFY_GROUP by _time useother=f | rename NOTIFY_GROUP as GROUP | fieldformat _time=strftime(_time,"%b %d")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 05 Aug 2013 15:27:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/date-sorting-numerically-not-alphabetically/m-p/24908#M4642</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-08-05T15:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: date sorting numerically not alphabetically</title>
      <link>https://community.splunk.com/t5/Splunk-Search/date-sorting-numerically-not-alphabetically/m-p/24909#M4643</link>
      <description>&lt;P&gt;Thanks for your response. I tried the code but still not the result I was looking for: &lt;IMG src="http://splunk-base.splunk.com//storage/2013-08-05_1306.png" alt="alt text" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2013 17:07:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/date-sorting-numerically-not-alphabetically/m-p/24909#M4643</guid>
      <dc:creator>aaronkorn</dc:creator>
      <dc:date>2013-08-05T17:07:53Z</dc:date>
    </item>
  </channel>
</rss>

