<?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: Date_hour  not returning in 24 hour based on AM/PM in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Date-hour-not-returning-in-24-hour-based-on-AM-PM/m-p/260767#M189658</link>
    <description>&lt;P&gt;The query isn't the issue, splunk didn't get the time correct at index.&lt;/P&gt;</description>
    <pubDate>Tue, 02 Feb 2016 14:47:56 GMT</pubDate>
    <dc:creator>TobiasBoone</dc:creator>
    <dc:date>2016-02-02T14:47:56Z</dc:date>
    <item>
      <title>Date_hour  not returning in 24 hour based on AM/PM</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Date-hour-not-returning-in-24-hour-based-on-AM-PM/m-p/260764#M189655</link>
      <description>&lt;P&gt;I have an input file that has lines like:&lt;BR /&gt;
2/1/2016,10:21AM,8006529721,4,TOLL-FREE&lt;/P&gt;

&lt;P&gt;Splunk is accounting for the time correctly in AM/PM however the data_hour values are all being kept in the 12 hour format; so when plotting and selecting for instance out of business hours we don't get good results because we never get an hour value above 12.  1300 to 2400 are lost with the PM.  &lt;/P&gt;

&lt;P&gt;Any ideas how to get hours back to a 24 hour clock?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2016 14:17:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Date-hour-not-returning-in-24-hour-based-on-AM-PM/m-p/260764#M189655</guid>
      <dc:creator>TobiasBoone</dc:creator>
      <dc:date>2016-02-02T14:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: Date_hour  not returning in 24 hour based on AM/PM</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Date-hour-not-returning-in-24-hour-based-on-AM-PM/m-p/260765#M189656</link>
      <description>&lt;P&gt;Use eval instead and parse your hour from _time:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearch
| eval hour = strftime(_time, "%H")
| plot using hour
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Feb 2016 14:29:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Date-hour-not-returning-in-24-hour-based-on-AM-PM/m-p/260765#M189656</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2016-02-02T14:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: Date_hour  not returning in 24 hour based on AM/PM</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Date-hour-not-returning-in-24-hour-based-on-AM-PM/m-p/260766#M189657</link>
      <description>&lt;P&gt;Almost the same results here...&lt;/P&gt;

&lt;P&gt;_time  date_hour  hour _raw&lt;BR /&gt;
2015-12-31 02:54:00 2   02  12/31/2015,02:54PM,5074576000,1,xyzname&lt;/P&gt;

&lt;P&gt;I would expect date_hour to come back as 14... the eval above bring back a padded 0 value of the same &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:37:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Date-hour-not-returning-in-24-hour-based-on-AM-PM/m-p/260766#M189657</guid>
      <dc:creator>TobiasBoone</dc:creator>
      <dc:date>2020-09-29T08:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: Date_hour  not returning in 24 hour based on AM/PM</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Date-hour-not-returning-in-24-hour-based-on-AM-PM/m-p/260767#M189658</link>
      <description>&lt;P&gt;The query isn't the issue, splunk didn't get the time correct at index.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2016 14:47:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Date-hour-not-returning-in-24-hour-based-on-AM-PM/m-p/260767#M189658</guid>
      <dc:creator>TobiasBoone</dc:creator>
      <dc:date>2016-02-02T14:47:56Z</dc:date>
    </item>
  </channel>
</rss>

