<?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: Use another time field to group information by time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Use-another-time-field-to-group-information-by-time/m-p/72504#M18134</link>
    <description>&lt;P&gt;This doesn't work?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="peticionesh_proceso_negocio" | eval DemoTime = strptime(InitialTime,"%Y-%m-%d %T.%q) | bin span=7d DemoTime | stats f(x) by DemoTime
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 11 Jun 2012 20:49:27 GMT</pubDate>
    <dc:creator>araitz</dc:creator>
    <dc:date>2012-06-11T20:49:27Z</dc:date>
    <item>
      <title>Use another time field to group information by time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-another-time-field-to-group-information-by-time/m-p/72503#M18133</link>
      <description>&lt;P&gt;Is there any way to use another time field than timestamp to group information by week?&lt;/P&gt;

&lt;P&gt;I tried to create a new time field known for splunk with strptime function and use it to group the information in weeks through bucket and chart commands without success.&lt;/P&gt;

&lt;P&gt;Query example:&lt;/P&gt;

&lt;P&gt;sourcetype="peticionesh_proceso_negocio" | eval DemoTime = strptime(InitialTime,"%Y-%m-%d %H:%M:%S.%l") | table  _time, DemoTime, InitialTime&lt;/P&gt;

&lt;P&gt;Data output example:&lt;/P&gt;

&lt;P&gt;ID         Timestamp (_time)    DemoTime          InitialTime&lt;BR /&gt;
1              6/8/12 12:45:00.950 PM   1345413600.000000         2012-08-20 00:00:00.000&lt;BR /&gt;
2              6/8/12 12:45:00.253 PM   1341180000.000000         2012-07-02 00:00:00.000&lt;BR /&gt;
3              6/8/12 12:44:59.350 PM   1342994400.000000         2012-07-23 00:00:00.000&lt;BR /&gt;
4              6/8/12 12:44:58.013 PM   1340575200.000000         2012-06-25 00:00:00.000&lt;/P&gt;

&lt;P&gt;Commands used:&lt;/P&gt;

&lt;P&gt;... | chart f(x) DemoTime span=1w&lt;BR /&gt;
… | bucket DemoTime span=1w&lt;/P&gt;

&lt;P&gt;Any help to solve this problem is appreciated. Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:55:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-another-time-field-to-group-information-by-time/m-p/72503#M18133</guid>
      <dc:creator>bfernandez</dc:creator>
      <dc:date>2020-09-28T11:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: Use another time field to group information by time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-another-time-field-to-group-information-by-time/m-p/72504#M18134</link>
      <description>&lt;P&gt;This doesn't work?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="peticionesh_proceso_negocio" | eval DemoTime = strptime(InitialTime,"%Y-%m-%d %T.%q) | bin span=7d DemoTime | stats f(x) by DemoTime
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Jun 2012 20:49:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-another-time-field-to-group-information-by-time/m-p/72504#M18134</guid>
      <dc:creator>araitz</dc:creator>
      <dc:date>2012-06-11T20:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: Use another time field to group information by time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-another-time-field-to-group-information-by-time/m-p/72505#M18135</link>
      <description>&lt;P&gt;I swear that yesterday you indicated another solution that include bin command and grouping by week.&lt;/P&gt;

&lt;P&gt;sourcetype="peticionesh_proceso_negocio" | eval DemoTime = strptime(InitialTime,"%Y-%m-%d %H:%M:%S.%l") | bin DemoTime span=1w as weeks | chart count by weeks&lt;/P&gt;

&lt;P&gt;What is the difference between bucket and bin command? it’s supposed to be an alias for bucket  command&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:55:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-another-time-field-to-group-information-by-time/m-p/72505#M18135</guid>
      <dc:creator>bfernandez</dc:creator>
      <dc:date>2020-09-28T11:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: Use another time field to group information by time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-another-time-field-to-group-information-by-time/m-p/72506#M18136</link>
      <description>&lt;P&gt;I changed it back so you could see the old search.  bin and bucket are the same command, the main difference was the use of stats and the split by DemoTime.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2012 16:11:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-another-time-field-to-group-information-by-time/m-p/72506#M18136</guid>
      <dc:creator>araitz</dc:creator>
      <dc:date>2012-06-12T16:11:45Z</dc:date>
    </item>
  </channel>
</rss>

