<?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: Issues with time parameter in Collect command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Issues-with-time-parameter-in-Collect-command/m-p/524798#M148048</link>
    <description>&lt;P&gt;Thanks for this&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;! what I have done here is I have added addinfo|eval _time = info_min_time which is giving me the yesterday date!&amp;nbsp; My new query, for the benefit of all the readers,&amp;nbsp; is now:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;| tstats count AS "Trip Count" FROM datamodel=ourdatamodel&lt;/P&gt;&lt;P&gt;where&amp;nbsp; &amp;nbsp;Condition&lt;/P&gt;&lt;P&gt;| addinfo| eval _time = info_min_time | Collect index=xyz sourcetype=abc addTime=T&amp;nbsp; &amp;nbsp; &amp;nbsp; (time parameter given in the scheduled report is&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="mailto:-1d@d" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;-1d@d&lt;/A&gt;&amp;nbsp;till&amp;nbsp;@d)&amp;nbsp;&lt;/P&gt;&lt;P&gt;and this is giving me the desired date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;AG.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Oct 2020 08:47:46 GMT</pubDate>
    <dc:creator>arjit</dc:creator>
    <dc:date>2020-10-15T08:47:46Z</dc:date>
    <item>
      <title>Issues with time parameter in Collect command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issues-with-time-parameter-in-Collect-command/m-p/524766#M148028</link>
      <description>&lt;P&gt;Hi All, I am populating the summary index from yesterdays data via tstats count on a Data model and inspite of adding the addTime=t, the query is updating the time from _raw i.e. today instead of yesterdays date.&amp;nbsp; My query is as below :&lt;/P&gt;&lt;P&gt;| tstats count AS "Trip Count" FROM datamodel=ourdatamodel&lt;/P&gt;&lt;P&gt;where&amp;nbsp; &amp;nbsp;Condition&lt;/P&gt;&lt;P&gt;| Collect index=xyz sourcetype=abc addTime=T&amp;nbsp; &amp;nbsp; &amp;nbsp; (time parameter given in the scheduled report is &lt;A href="mailto:-1d@d" target="_blank" rel="noopener"&gt;-1d@d&lt;/A&gt;&amp;nbsp;till&amp;nbsp;@d)&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I tried extracting the info_min_time to check whether this parameter is available through&lt;/P&gt;&lt;P&gt;(The documentation states the collect command will look for info_min_time and if it is not present, then it will look for _time)&lt;/P&gt;&lt;P&gt;| tstats count AS "Trip Count", earliest(info_min_time) FROM datamodel=ourdatamodel .......&lt;/P&gt;&lt;P&gt;I am not getting any value for this field in the result.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Can you please suggest why inspite of adding addTime=T, we are not getting date as yesterday's date ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;AG.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 05:44:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issues-with-time-parameter-in-Collect-command/m-p/524766#M148028</guid>
      <dc:creator>arjit</dc:creator>
      <dc:date>2020-10-15T05:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with time parameter in Collect command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issues-with-time-parameter-in-Collect-command/m-p/524768#M148029</link>
      <description>&lt;P&gt;The argument option addTime you used is wrong. it's supposed to be addtime ( t is lowercase in time).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;addtime
Syntax: addtime=&amp;lt;bool&amp;gt;
Description: Use this option to specify whether to prefix a time field on to each event. Some commands return results that do not have a _raw field, such as the stats, chart, timechart commands. If you specify addtime=false, the Splunk software uses its generic date detection against fields in whatever order they happen to be in the summary rows. If you specify addtime=true, the Splunk software uses the search time range info_min_time. This time range is added by the sistats command or _time. Splunk software adds the time field based on the first field that it finds: info_min_time, _time, or now().
Default: true&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 06:00:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issues-with-time-parameter-in-Collect-command/m-p/524768#M148029</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2020-10-15T06:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with time parameter in Collect command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issues-with-time-parameter-in-Collect-command/m-p/524775#M148031</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/129407"&gt;@thambisetty&lt;/a&gt;&amp;nbsp;, thanks for this but it accepts both addTime and addtime... I have already tried running both of them but both are not working ...&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suspect the problem must be with using tstats command on datamodel probably ... .&lt;/P&gt;&lt;P&gt;Please suggest if you have any suggestions here ...&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;AG.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 06:52:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issues-with-time-parameter-in-Collect-command/m-p/524775#M148031</guid>
      <dc:creator>arjit</dc:creator>
      <dc:date>2020-10-15T06:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with time parameter in Collect command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issues-with-time-parameter-in-Collect-command/m-p/524793#M148043</link>
      <description>&lt;P&gt;Does the tstats actually return anything that could be a date/time? Try adding addinfo between the tstats and collect commands&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 08:10:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issues-with-time-parameter-in-Collect-command/m-p/524793#M148043</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-15T08:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with time parameter in Collect command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issues-with-time-parameter-in-Collect-command/m-p/524798#M148048</link>
      <description>&lt;P&gt;Thanks for this&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;! what I have done here is I have added addinfo|eval _time = info_min_time which is giving me the yesterday date!&amp;nbsp; My new query, for the benefit of all the readers,&amp;nbsp; is now:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;| tstats count AS "Trip Count" FROM datamodel=ourdatamodel&lt;/P&gt;&lt;P&gt;where&amp;nbsp; &amp;nbsp;Condition&lt;/P&gt;&lt;P&gt;| addinfo| eval _time = info_min_time | Collect index=xyz sourcetype=abc addTime=T&amp;nbsp; &amp;nbsp; &amp;nbsp; (time parameter given in the scheduled report is&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="mailto:-1d@d" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;-1d@d&lt;/A&gt;&amp;nbsp;till&amp;nbsp;@d)&amp;nbsp;&lt;/P&gt;&lt;P&gt;and this is giving me the desired date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;AG.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 08:47:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issues-with-time-parameter-in-Collect-command/m-p/524798#M148048</guid>
      <dc:creator>arjit</dc:creator>
      <dc:date>2020-10-15T08:47:46Z</dc:date>
    </item>
  </channel>
</rss>

