<?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: Unable to rename _time as Time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Unable-to-rename-time-as-Time/m-p/343876#M160729</link>
    <description>&lt;P&gt;Please see my other answer below; the way to make it exactly the same is with &lt;CODE&gt;fieldformat&lt;/CODE&gt;, not with &lt;CODE&gt;eval&lt;/CODE&gt;.&lt;/P&gt;</description>
    <pubDate>Mon, 12 Jun 2017 16:42:05 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2017-06-12T16:42:05Z</dc:date>
    <item>
      <title>Unable to rename _time as Time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Unable-to-rename-time-as-Time/m-p/343870#M160723</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm trying to rename _time as Time so that it will display the timestamp in YYYY-MM-DD HH:MM:SS. But when I do rename _time AS "Time" | table Time, it will show the time as Epoch time which was the original format extracted from the log file. How do I rename and table it correctly?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 16:15:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Unable-to-rename-time-as-Time/m-p/343870#M160723</guid>
      <dc:creator>wuming79</dc:creator>
      <dc:date>2017-06-12T16:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to rename _time as Time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Unable-to-rename-time-as-Time/m-p/343871#M160724</link>
      <description>&lt;P&gt;try to do an &lt;CODE&gt;|eval time=strftime(_time,"%Y-%m-%d %H:%M:%S")|table time...&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 16:18:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Unable-to-rename-time-as-Time/m-p/343871#M160724</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-06-12T16:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to rename _time as Time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Unable-to-rename-time-as-Time/m-p/343872#M160725</link>
      <description>&lt;P&gt;Hi wuming79,&lt;/P&gt;

&lt;P&gt;you can't rename the _time field without getting the value all f*cked up. &lt;/P&gt;

&lt;P&gt;Instead do something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearch | eval TIME=strftime(_time, "%d-%m-%Y %H:%M:%S") | table TIME | rename TIME AS whateveryouwantittobe
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Jun 2017 16:22:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Unable-to-rename-time-as-Time/m-p/343872#M160725</guid>
      <dc:creator>horsefez</dc:creator>
      <dc:date>2017-06-12T16:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to rename _time as Time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Unable-to-rename-time-as-Time/m-p/343873#M160726</link>
      <description>&lt;P&gt;I suggest that you don't do a rename of _time, try using an eval to add "Time" and then remove the _time with fields -, such as;&lt;/P&gt;

&lt;P&gt;| eval Time = strftime(_time, "%Y-%d-%m %H:%M:%S") | fields - _time | table Time&lt;/P&gt;

&lt;P&gt;That works for me.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 16:22:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Unable-to-rename-time-as-Time/m-p/343873#M160726</guid>
      <dc:creator>BlueSocket</dc:creator>
      <dc:date>2017-06-12T16:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to rename _time as Time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Unable-to-rename-time-as-Time/m-p/343874#M160727</link>
      <description>&lt;P&gt;Thanks Guys!&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 16:37:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Unable-to-rename-time-as-Time/m-p/343874#M160727</guid>
      <dc:creator>wuming79</dc:creator>
      <dc:date>2017-06-12T16:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to rename _time as Time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Unable-to-rename-time-as-Time/m-p/343875#M160728</link>
      <description>&lt;P&gt;The &lt;CODE&gt;_time&lt;/CODE&gt; field is very special in a number of ways and one of them is that it automatically does this under the sheets:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| fieldformat _time = strftime(_time, &amp;lt;YourLocalRegionTimeFormatStringHere&amp;gt;)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can do the same like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rename _time AS Time
| fieldformat Time = strftime(Time, "%m/%d/%Y %H:%M:%S")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Jun 2017 16:41:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Unable-to-rename-time-as-Time/m-p/343875#M160728</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-06-12T16:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to rename _time as Time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Unable-to-rename-time-as-Time/m-p/343876#M160729</link>
      <description>&lt;P&gt;Please see my other answer below; the way to make it exactly the same is with &lt;CODE&gt;fieldformat&lt;/CODE&gt;, not with &lt;CODE&gt;eval&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 16:42:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Unable-to-rename-time-as-Time/m-p/343876#M160729</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-06-12T16:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to rename _time as Time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Unable-to-rename-time-as-Time/m-p/343877#M160730</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;

&lt;P&gt;I just realized after using the suggested formats, my earliest to latest timestamp is from right to left instead of the normal left to right. How can I reversed this to go from left to right?&lt;/P&gt;

&lt;P&gt;How do I also make the timestamp display on the x-axis? There is only label rotation in x-axis format.&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/3056i10193A76A83A9DB2/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2017 05:21:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Unable-to-rename-time-as-Time/m-p/343877#M160730</guid>
      <dc:creator>wuming79</dc:creator>
      <dc:date>2017-06-19T05:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to rename _time as Time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Unable-to-rename-time-as-Time/m-p/569392#M198449</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/1406"&gt;@woodcock&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have been dragging though a ton of these threads trying to find a simple way to fix how my field _time output information.&amp;nbsp; I just wanted the date, so I took off the time aspect of your command and BOOM. Thank you.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rename _time AS Date
| fieldformat Date = strftime(Date, "%Y-%m-%d")&lt;/LI-CODE&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;Date&lt;/P&gt;&lt;P&gt;2021-10-01&lt;/P&gt;</description>
      <pubDate>Fri, 01 Oct 2021 18:50:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Unable-to-rename-time-as-Time/m-p/569392#M198449</guid>
      <dc:creator>rjgreg</dc:creator>
      <dc:date>2021-10-01T18:50:34Z</dc:date>
    </item>
  </channel>
</rss>

