<?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 we modify a wrong timestamp? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/can-we-modify-a-wrong-timestamp/m-p/69510#M14112</link>
    <description>&lt;P&gt;Exactly, you're overwriting the &lt;CODE&gt;_time&lt;/CODE&gt; field with &lt;CODE&gt;eval&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;If the &lt;CODE&gt;_time&lt;/CODE&gt; field is empty after running &lt;CODE&gt;eval&lt;/CODE&gt; that's because the &lt;CODE&gt;strptime&lt;/CODE&gt; expression couldn't be applied successfully. You need to check that the format from the &lt;CODE&gt;mytime&lt;/CODE&gt; field matches the &lt;CODE&gt;strptime&lt;/CODE&gt; format string.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jun 2012 09:26:54 GMT</pubDate>
    <dc:creator>Ayn</dc:creator>
    <dc:date>2012-06-07T09:26:54Z</dc:date>
    <item>
      <title>can we modify a wrong timestamp?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/can-we-modify-a-wrong-timestamp/m-p/69505#M14107</link>
      <description>&lt;P&gt;the default _time are actually at the time of indexing. however my logs have another time string which i have to separately extract now.&lt;BR /&gt;&lt;BR /&gt;
e.g&lt;BR /&gt;&lt;BR /&gt;
    _time                      Date          Time&lt;BR /&gt;&lt;BR /&gt;
    05/06/2012 13:19:00.000 7/24/2011   1:47:05&lt;/P&gt;

&lt;P&gt;basically im trying to create a timechart but span=1h seems to only affect _time. Any one has encountered such a situation before? I wan to apply it to "Time" field at the very least? &lt;/P&gt;

&lt;P&gt;or is there any way to change _time to reflect the new time.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2012 07:25:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/can-we-modify-a-wrong-timestamp/m-p/69505#M14107</guid>
      <dc:creator>attgjh1</dc:creator>
      <dc:date>2012-06-07T07:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: can we modify a wrong timestamp?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/can-we-modify-a-wrong-timestamp/m-p/69506#M14108</link>
      <description>&lt;P&gt;Do you want to:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Permanently change the &lt;CODE&gt;_time&lt;/CODE&gt; value for events that are already in the index? That cannot be done.&lt;/LI&gt;
&lt;LI&gt;Configure Splunk to properly recognize the timestamp so that &lt;CODE&gt;_time&lt;/CODE&gt; will contain the correct timestamp in the future? Have a look at &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/Configuretimestamprecognition"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Data/Configuretimestamprecognition&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Just temporarily set the &lt;CODE&gt;_time&lt;/CODE&gt; value to something else? That could be done by using &lt;CODE&gt;eval&lt;/CODE&gt; before running &lt;CODE&gt;timechart&lt;/CODE&gt;. I could update my answer with more details on how to do this if this is what you want to do.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;UPDATE: So, if you want to go with option 3, you could do something like what I show below. I'm assuming that your fields called what you specified "Date" and "Time".&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval mytime=Date." ".Time | eval _time=strptime(mytime,"%m/%d/%Y %H:%M:%S") | timechart ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;After you've done the &lt;CODE&gt;eval&lt;/CODE&gt;, the &lt;CODE&gt;_time&lt;/CODE&gt; field that will be picked up by &lt;CODE&gt;timechart&lt;/CODE&gt; is the one you just extracted from the Date and Time fields, instead of the actual timestamp that Splunk put on the event.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2012 07:34:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/can-we-modify-a-wrong-timestamp/m-p/69506#M14108</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-06-07T07:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: can we modify a wrong timestamp?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/can-we-modify-a-wrong-timestamp/m-p/69507#M14109</link>
      <description>&lt;P&gt;as long as i can walk around a solution to sort them hourly. still working a way around it cuz span works only on _time. &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;is there a way to trick splunk to work and display a chart using Time Date instead? (probably something like ur 3rd suggestion which i have yet figure out how ) &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;thanks alot!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2012 07:57:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/can-we-modify-a-wrong-timestamp/m-p/69507#M14109</guid>
      <dc:creator>attgjh1</dc:creator>
      <dc:date>2012-06-07T07:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: can we modify a wrong timestamp?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/can-we-modify-a-wrong-timestamp/m-p/69508#M14110</link>
      <description>&lt;P&gt;Updated my answer.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2012 08:19:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/can-we-modify-a-wrong-timestamp/m-p/69508#M14110</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-06-07T08:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: can we modify a wrong timestamp?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/can-we-modify-a-wrong-timestamp/m-p/69509#M14111</link>
      <description>&lt;P&gt;thanks. i sort of understand your suggestion. im under the assumption that _time can be overwritten with eval?&lt;/P&gt;

&lt;P&gt;hmm. ive tried it but it didnt work.here is my regex and my search line:&lt;/P&gt;

&lt;P&gt;rex "(?i)^(?P&lt;DATE&gt;[\d/]*) (?P&lt;TIME&gt;[\d:]+)" | eval mytime=Date." ".Time | eval _time=strptime(mytime,"%m/%d/%Y %H:%M:%S") | table _time Date Time&lt;/TIME&gt;&lt;/DATE&gt;&lt;/P&gt;

&lt;P&gt;somehow _time is now blank fields but i have the fields extracted correctly.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2012 08:41:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/can-we-modify-a-wrong-timestamp/m-p/69509#M14111</guid>
      <dc:creator>attgjh1</dc:creator>
      <dc:date>2012-06-07T08:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: can we modify a wrong timestamp?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/can-we-modify-a-wrong-timestamp/m-p/69510#M14112</link>
      <description>&lt;P&gt;Exactly, you're overwriting the &lt;CODE&gt;_time&lt;/CODE&gt; field with &lt;CODE&gt;eval&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;If the &lt;CODE&gt;_time&lt;/CODE&gt; field is empty after running &lt;CODE&gt;eval&lt;/CODE&gt; that's because the &lt;CODE&gt;strptime&lt;/CODE&gt; expression couldn't be applied successfully. You need to check that the format from the &lt;CODE&gt;mytime&lt;/CODE&gt; field matches the &lt;CODE&gt;strptime&lt;/CODE&gt; format string.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2012 09:26:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/can-we-modify-a-wrong-timestamp/m-p/69510#M14112</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-06-07T09:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: can we modify a wrong timestamp?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/can-we-modify-a-wrong-timestamp/m-p/69511#M14113</link>
      <description>&lt;P&gt;Thanks alot. &lt;/P&gt;

&lt;P&gt;Here's a cookie.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jun 2012 00:39:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/can-we-modify-a-wrong-timestamp/m-p/69511#M14113</guid>
      <dc:creator>attgjh1</dc:creator>
      <dc:date>2012-06-08T00:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: can we modify a wrong timestamp?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/can-we-modify-a-wrong-timestamp/m-p/69512#M14114</link>
      <description>&lt;P&gt;you just received a cookie!&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jul 2015 08:38:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/can-we-modify-a-wrong-timestamp/m-p/69512#M14114</guid>
      <dc:creator>imanpoeiri</dc:creator>
      <dc:date>2015-07-20T08:38:51Z</dc:date>
    </item>
  </channel>
</rss>

