<?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: Changing date_hour format in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Changing-date-hour-format/m-p/330940#M162576</link>
    <description>&lt;P&gt;Hi @niketnilay,&lt;/P&gt;

&lt;P&gt;It's work fine to display 01:00, 02:00...etc. However my requirement is to able to display as "01:00 - 01:59", how can I achieve that?&lt;/P&gt;</description>
    <pubDate>Tue, 06 Mar 2018 03:30:56 GMT</pubDate>
    <dc:creator>krusovice</dc:creator>
    <dc:date>2018-03-06T03:30:56Z</dc:date>
    <item>
      <title>Changing date_hour format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Changing-date-hour-format/m-p/330938#M162574</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;I would like to use date_hour as part of the query. The result of date_hour showing 1,2,3....23. How can I change the format of date_hour to become e.g. 1 is 1:00 to 1:59, 20 is 20:00 to 20:59?&lt;/P&gt;

&lt;P&gt;Thanks for your help in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:18:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Changing-date-hour-format/m-p/330938#M162574</guid>
      <dc:creator>krusovice</dc:creator>
      <dc:date>2020-09-29T18:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Changing date_hour format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Changing-date-hour-format/m-p/330939#M162575</link>
      <description>&lt;P&gt;@krusovice, you can try the following&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;yourcurrentsearch&amp;gt;
| eval date_hour=if(len(date_hour)==1,"0".date_hour.":00",date_hour.":00")
| sort date_hour
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Following is a run anywhere search based on Splunk's _internal index&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal sourcetype=splunkd log_level!="INFO"
| stats count by date_hour
| eval date_hour=if(len(date_hour)==1,"0".date_hour.":00",date_hour.":00")
| sort date_hour
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Mar 2018 03:02:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Changing-date-hour-format/m-p/330939#M162575</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-03-06T03:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: Changing date_hour format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Changing-date-hour-format/m-p/330940#M162576</link>
      <description>&lt;P&gt;Hi @niketnilay,&lt;/P&gt;

&lt;P&gt;It's work fine to display 01:00, 02:00...etc. However my requirement is to able to display as "01:00 - 01:59", how can I achieve that?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 03:30:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Changing-date-hour-format/m-p/330940#M162576</guid>
      <dc:creator>krusovice</dc:creator>
      <dc:date>2018-03-06T03:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: Changing date_hour format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Changing-date-hour-format/m-p/330941#M162577</link>
      <description>&lt;P&gt;Try the following then:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval date_hour=if(len(date_hour)==1,"0".date_hour.":00 - ".date_hour.":59",date_hour.":00 - ".date_hour.":59")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Mar 2018 03:35:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Changing-date-hour-format/m-p/330941#M162577</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-03-06T03:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: Changing date_hour format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Changing-date-hour-format/m-p/330942#M162578</link>
      <description>&lt;P&gt;Thank you so much for the answer,  my result looking great now &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 03:44:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Changing-date-hour-format/m-p/330942#M162578</guid>
      <dc:creator>krusovice</dc:creator>
      <dc:date>2018-03-06T03:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: Changing date_hour format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Changing-date-hour-format/m-p/330943#M162579</link>
      <description>&lt;P&gt;Glad it worked &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 03:46:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Changing-date-hour-format/m-p/330943#M162579</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-03-06T03:46:22Z</dc:date>
    </item>
  </channel>
</rss>

