<?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: Set Custom time as _time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Set-Custom-time-as-time/m-p/350100#M164266</link>
    <description>&lt;P&gt;Hi kpavan,&lt;/P&gt;

&lt;P&gt;Please try following link:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/439494/how-to-change-time-to-some-other-timestamp-field-f.html"&gt;link text&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Dec 2017 05:54:51 GMT</pubDate>
    <dc:creator>p_gurav</dc:creator>
    <dc:date>2017-12-20T05:54:51Z</dc:date>
    <item>
      <title>Set Custom time as _time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Set-Custom-time-as-time/m-p/350099#M164265</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I have requirement like we have custom time field ALERTDATETIME i want to display graph where my custom time field should be primary time field. This could have been easy if they asked just display ALERTDATETIME stats but they want time filter in graph where if they select last 7days or expanding to 30 days the data should be displayed based on ALERTDATETIME not the _time field. So am stuck here how to set custom time field as _time when user filtering date.&lt;/P&gt;

&lt;P&gt;The date format of ALERTDATETIME is "%Y-%m-%d %H:%M:%S", need to convert only %Y-%m-%d. I tried something like below query but didn't work.&lt;/P&gt;

&lt;P&gt;base search&lt;BR /&gt;
| eval _time=strptime(ALERTDATETIME,"%Y-%m-%d")&lt;BR /&gt;
| stats count by _time&lt;/P&gt;

&lt;P&gt;Thanks!&lt;BR /&gt;
Pavan&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 05:43:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Set-Custom-time-as-time/m-p/350099#M164265</guid>
      <dc:creator>kpavan</dc:creator>
      <dc:date>2017-12-20T05:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: Set Custom time as _time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Set-Custom-time-as-time/m-p/350100#M164266</link>
      <description>&lt;P&gt;Hi kpavan,&lt;/P&gt;

&lt;P&gt;Please try following link:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/439494/how-to-change-time-to-some-other-timestamp-field-f.html"&gt;link text&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 05:54:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Set-Custom-time-as-time/m-p/350100#M164266</guid>
      <dc:creator>p_gurav</dc:creator>
      <dc:date>2017-12-20T05:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: Set Custom time as _time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Set-Custom-time-as-time/m-p/350101#M164267</link>
      <description>&lt;P&gt;When the user searches for, say, 7 days, do they expect that search to return results where &lt;CODE&gt;ALERTDATETIME&lt;/CODE&gt; is within that 7 day window, or do they only want the resulting output to make use of &lt;CODE&gt;ALERTDATETIME&lt;/CODE&gt;?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 11:59:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Set-Custom-time-as-time/m-p/350101#M164267</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2017-12-20T11:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: Set Custom time as _time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Set-Custom-time-as-time/m-p/350102#M164268</link>
      <description>&lt;P&gt;try using this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search
| addinfo 
| eval _time=strptime(ALERTDATETIME,"%Y-%m-%d") 
| where _time&amp;gt;=info_min_time AND (info_max_time="+Infinity" OR _time&amp;lt;=info_max_time)
| stats count by _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;that should allow for use of the time picker. &lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 12:39:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Set-Custom-time-as-time/m-p/350102#M164268</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-12-20T12:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Set Custom time as _time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Set-Custom-time-as-time/m-p/350103#M164269</link>
      <description>&lt;P&gt;Hi Micahkemp&lt;/P&gt;

&lt;P&gt;Thanks for reply!&lt;/P&gt;

&lt;P&gt;They want to When the user searches for, say, 7 days, do they expect that search to return results where ALERTDATETIME is within that 7 day window&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 14:45:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Set-Custom-time-as-time/m-p/350103#M164269</guid>
      <dc:creator>kpavan</dc:creator>
      <dc:date>2017-12-20T14:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Set Custom time as _time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Set-Custom-time-as-time/m-p/350104#M164270</link>
      <description>&lt;P&gt;In that case you need to ensure the timepicker range selected encompasses the full time range of the actual &lt;CODE&gt;_time&lt;/CODE&gt; field that may have events with &lt;CODE&gt;ALERTDATETIME&lt;/CODE&gt; in the desired range.  That may mean users can't select 7 days from the timepicker if they want 7 days based on &lt;CODE&gt;ALERTDATETIME&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;The timepicker will only define your time window based on &lt;CODE&gt;_time&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 00:45:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Set-Custom-time-as-time/m-p/350104#M164270</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2017-12-21T00:45:26Z</dc:date>
    </item>
  </channel>
</rss>

