<?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: Can't use a filed for timestamp in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-t-use-a-filed-for-timestamp/m-p/315199#M94376</link>
    <description>&lt;P&gt;The use of the time picker was the goal, without it, my search not modulabe.&lt;/P&gt;</description>
    <pubDate>Wed, 28 Feb 2018 17:52:28 GMT</pubDate>
    <dc:creator>Alaza</dc:creator>
    <dc:date>2018-02-28T17:52:28Z</dc:date>
    <item>
      <title>Can't use a filed for timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-t-use-a-filed-for-timestamp/m-p/315195#M94372</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have importing a CSV file with the field2 for the timestamp. It's working.&lt;BR /&gt;
After that I need to create a timechart using the filed1 for the timestamp.&lt;BR /&gt;
I use this :&lt;BR /&gt;
|eval _time=strptime(field1, "%d/%m/%Y")&lt;BR /&gt;
| timechart span=year count(field3) &lt;/P&gt;

&lt;P&gt;If I put "all the time" on the timepicker, it works.&lt;BR /&gt;
But if put "year 2013" on the timepicker the year 2013, the result is the events of the year 2013 based on the index time ( equal to field2) and not the field1.&lt;/P&gt;

&lt;P&gt;I don't understand why the timechart is based on the events link to the field1 inside the event link to the field2.&lt;/P&gt;

&lt;P&gt;[Version Splunk    6.6.3]&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 08:53:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-t-use-a-filed-for-timestamp/m-p/315195#M94372</guid>
      <dc:creator>Alaza</dc:creator>
      <dc:date>2018-02-28T08:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can't use a filed for timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-t-use-a-filed-for-timestamp/m-p/315196#M94373</link>
      <description>&lt;P&gt;the time picker uses the indexed time field for filtering. you will need to add a secondary filter for &lt;STRONG&gt;field1&lt;/STRONG&gt; to filter on, such as &lt;CODE&gt;&amp;lt;base search&amp;gt; field1=*2013|eval _time=strptime(field1, "%d/%m/%Y")| timechart span=year count(field3)&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 12:36:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-t-use-a-filed-for-timestamp/m-p/315196#M94373</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2018-02-28T12:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: Can't use a filed for timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-t-use-a-filed-for-timestamp/m-p/315197#M94374</link>
      <description>&lt;P&gt;Hi, as I said I already use |eval _time=strptime(field1, "%d/%m/%Y").&lt;BR /&gt;
Can you be more precise ?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 16:22:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-t-use-a-filed-for-timestamp/m-p/315197#M94374</guid>
      <dc:creator>Alaza</dc:creator>
      <dc:date>2018-02-28T16:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Can't use a filed for timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-t-use-a-filed-for-timestamp/m-p/315198#M94375</link>
      <description>&lt;P&gt;you need to filter for the keyword 2013 in your base search. you can't use your time picker. you'll still need to eval &lt;CODE&gt;_time&lt;/CODE&gt; to &lt;EM&gt;field1&lt;/EM&gt; in order to use that field in &lt;CODE&gt;timechart&lt;/CODE&gt; but to filter for just 2013, you'll need to add it to the beginning of the search.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=csv field1=*2013|eval _time=strptime(field1, "%d/%m/%Y")| timechart span=year count(field3)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Feb 2018 16:30:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-t-use-a-filed-for-timestamp/m-p/315198#M94375</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2018-02-28T16:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: Can't use a filed for timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-t-use-a-filed-for-timestamp/m-p/315199#M94376</link>
      <description>&lt;P&gt;The use of the time picker was the goal, without it, my search not modulabe.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 17:52:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-t-use-a-filed-for-timestamp/m-p/315199#M94376</guid>
      <dc:creator>Alaza</dc:creator>
      <dc:date>2018-02-28T17:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: Can't use a filed for timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-t-use-a-filed-for-timestamp/m-p/315200#M94377</link>
      <description>&lt;P&gt;try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...
| addinfo 
|eval _time=strptime(field1, "%d/%m/%Y")
| where _time&amp;gt;=info_min_time AND (info_max_time="+Infinity" OR _time&amp;lt;info_max_time) 
| fields - info_min_time info_max_time info_search_time info_sid
| timechart span=year count(field3)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Feb 2018 18:19:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-t-use-a-filed-for-timestamp/m-p/315200#M94377</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2018-02-28T18:19:23Z</dc:date>
    </item>
  </channel>
</rss>

