<?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: converting this search to hours instead of days in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/converting-this-search-to-hours-instead-of-days/m-p/668191#M229229</link>
    <description>&lt;P&gt;Change the &lt;FONT face="courier new,courier"&gt;bin&lt;/FONT&gt; command to set the desired interval.&amp;nbsp; Then adjust the &lt;FONT face="courier new,courier"&gt;strftime&lt;/FONT&gt; function.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| bin _time span=1h
| eval _time=strftime(_time,"%H")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Nov 2023 01:20:20 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2023-11-10T01:20:20Z</dc:date>
    <item>
      <title>converting this search to hours instead of days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/converting-this-search-to-hours-instead-of-days/m-p/668185#M229224</link>
      <description>&lt;P&gt;Hi im trying to convert this search to show totals in hours instead of days/dates can anyone help me please?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;index=analyst reporttype=DepTrayCaseQty Location=DEP/AutoDep*&lt;BR /&gt;| where Dimension&amp;gt;0 OR ProtrusionError&amp;gt;0 OR OffCentreError&amp;gt;0&lt;BR /&gt;| table _time OrderId ProtrusionError OffCentreError Dimension *&lt;BR /&gt;| bin _time span=1d&lt;BR /&gt;| eval _time=strftime(_time,"%d")&lt;BR /&gt;| eval foo=ProtrusionError+OffCentreError+Dimension&lt;BR /&gt;| chart sum(foo) as ErrorFrequency over Location by _time useother=f limit=100&lt;BR /&gt;| addtotals&lt;BR /&gt;| sort 0 - Total _time&lt;BR /&gt;| fields - TOTAL&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 00:52:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/converting-this-search-to-hours-instead-of-days/m-p/668185#M229224</guid>
      <dc:creator>Peterm1993</dc:creator>
      <dc:date>2023-11-10T00:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: converting this search to hours instead of days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/converting-this-search-to-hours-instead-of-days/m-p/668190#M229228</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/262358"&gt;@Peterm1993&lt;/a&gt;&amp;nbsp;.. do you mean, you want to convert number of days to number of hours (days divided by 24) .. OR.. when you are using that strftime, instead of picking up the days(%d), you want to pick up the hours... please confirm.. thanks.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=analyst reporttype=DepTrayCaseQty Location=DEP/AutoDep*
| where Dimension&amp;gt;0 OR ProtrusionError&amp;gt;0 OR OffCentreError&amp;gt;0
| table _time OrderId ProtrusionError OffCentreError Dimension *
| bin _time span=1d
| eval Total_time=strftime(_time,"%d")
```Comment - looks like you miss-typed the "Total_time" as "_time"```
| eval foo=ProtrusionError+OffCentreError+Dimension
| chart sum(foo) as ErrorFrequency over Location by _time useother=f limit=100
| addtotals
| sort 0 - Total _time
| fields - TOTAL&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 01:18:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/converting-this-search-to-hours-instead-of-days/m-p/668190#M229228</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2023-11-10T01:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: converting this search to hours instead of days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/converting-this-search-to-hours-instead-of-days/m-p/668191#M229229</link>
      <description>&lt;P&gt;Change the &lt;FONT face="courier new,courier"&gt;bin&lt;/FONT&gt; command to set the desired interval.&amp;nbsp; Then adjust the &lt;FONT face="courier new,courier"&gt;strftime&lt;/FONT&gt; function.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| bin _time span=1h
| eval _time=strftime(_time,"%H")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 01:20:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/converting-this-search-to-hours-instead-of-days/m-p/668191#M229229</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-11-10T01:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: converting this search to hours instead of days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/converting-this-search-to-hours-instead-of-days/m-p/668195#M229230</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/80737"&gt;@inventsekar&lt;/a&gt; I'm trying to convert the results from a daily result to a hourly breakdown so instead of for example and apologies cause I'm very new to splunk&lt;BR /&gt;&lt;BR /&gt;9/11/23 165 errors&lt;/P&gt;&lt;P&gt;it would be&lt;/P&gt;&lt;P&gt;1am-2am12 errors&lt;/P&gt;&lt;P&gt;2am-3am 35 errors&lt;/P&gt;&lt;P&gt;3am-4am 12 errors&lt;/P&gt;&lt;P&gt;totaling to 165 errors&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 01:50:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/converting-this-search-to-hours-instead-of-days/m-p/668195#M229230</guid>
      <dc:creator>Peterm1993</dc:creator>
      <dc:date>2023-11-10T01:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: converting this search to hours instead of days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/converting-this-search-to-hours-instead-of-days/m-p/668196#M229231</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/262358"&gt;@Peterm1993&lt;/a&gt;&amp;nbsp;.. As Rich suggested, the bin command should be adjusted to hour and then the strftime command should be edited from "%d" to "%H" (if this %H does not work, then, pls copy paste a sample event's _time value... we should double check how the hours looks.. (is it 12 hrs or is it 24 hrs))&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Please try this Search Query.. thanks.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=analyst reporttype=DepTrayCaseQty Location=DEP/AutoDep*
| where Dimension&amp;gt;0 OR ProtrusionError&amp;gt;0 OR OffCentreError&amp;gt;0
| table _time OrderId ProtrusionError OffCentreError Dimension *
| bin _time span=1h
| eval _time=strftime(_time,"%H")
| eval foo=ProtrusionError+OffCentreError+Dimension
| chart sum(foo) as ErrorFrequency over Location by _time useother=f limit=100
| addtotals
| sort 0 - Total _time
| fields - TOTAL&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 01:58:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/converting-this-search-to-hours-instead-of-days/m-p/668196#M229231</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2023-11-10T01:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: converting this search to hours instead of days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/converting-this-search-to-hours-instead-of-days/m-p/668197#M229232</link>
      <description>&lt;P&gt;figured it out. thanks for your help.&lt;BR /&gt;&lt;BR /&gt;index=analyst reporttype=DepTrayCaseQty Location=DEP/AutoDep*&lt;BR /&gt;| where OrientationError&amp;gt;0&lt;BR /&gt;| table _time OrderId OrientationError *&lt;BR /&gt;| bin _time span=1h&lt;BR /&gt;| eval _time=strftime(_time,"%dt%H")&lt;BR /&gt;| chart sum(OrientationError) as ErrorFrequency over Location by _time useother=f limit=200&lt;BR /&gt;| addtotals&lt;BR /&gt;| sort 0 - Total _time&lt;BR /&gt;| fields - TOTAL&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;was what i was looking for!&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 02:00:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/converting-this-search-to-hours-instead-of-days/m-p/668197#M229232</guid>
      <dc:creator>Peterm1993</dc:creator>
      <dc:date>2023-11-10T02:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: converting this search to hours instead of days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/converting-this-search-to-hours-instead-of-days/m-p/668198#M229233</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/262358"&gt;@Peterm1993&lt;/a&gt;&amp;nbsp;.. Please add karma&amp;nbsp; / upvote the reply which helped you.. thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 02:02:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/converting-this-search-to-hours-instead-of-days/m-p/668198#M229233</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2023-11-10T02:02:46Z</dc:date>
    </item>
  </channel>
</rss>

