<?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: Adding column to timechart table. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Adding-column-to-timechart-table/m-p/107506#M183389</link>
    <description>&lt;P&gt;Yes. You need to move the eval to after the timechart.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|timechart distinct_count(Stuff)
|eval Time=strftime(_time, "%m/%d/%Y %H:%M:%S")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but this will leave you with both _time and Time and in my case Time was at the wrong end of the table so I added the following.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| fields - _time | table Time *
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 02 Apr 2012 22:42:04 GMT</pubDate>
    <dc:creator>BobM</dc:creator>
    <dc:date>2012-04-02T22:42:04Z</dc:date>
    <item>
      <title>Adding column to timechart table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-column-to-timechart-table/m-p/107505#M183388</link>
      <description>&lt;P&gt;I wanted to add my converted Time to a timechart, but don't know how.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|convert ctime(_time) AS Time
|eval Time=strftime(_time, "%m/%d/%Y %H:%M:%S")
|timechart distinct_count(Stuff)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will give me a table with the default _time value and I wanted to add Time to the timechart and remove the default _time column - is there any way to do this?&lt;/P&gt;

&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2012 21:54:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-column-to-timechart-table/m-p/107505#M183388</guid>
      <dc:creator>sflunk</dc:creator>
      <dc:date>2012-04-02T21:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: Adding column to timechart table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-column-to-timechart-table/m-p/107506#M183389</link>
      <description>&lt;P&gt;Yes. You need to move the eval to after the timechart.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|timechart distinct_count(Stuff)
|eval Time=strftime(_time, "%m/%d/%Y %H:%M:%S")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but this will leave you with both _time and Time and in my case Time was at the wrong end of the table so I added the following.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| fields - _time | table Time *
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Apr 2012 22:42:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-column-to-timechart-table/m-p/107506#M183389</guid>
      <dc:creator>BobM</dc:creator>
      <dc:date>2012-04-02T22:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: Adding column to timechart table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-column-to-timechart-table/m-p/107507#M183390</link>
      <description>&lt;P&gt;Worked beautifully.  Thank you!!!&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2012 22:48:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-column-to-timechart-table/m-p/107507#M183390</guid>
      <dc:creator>sflunk</dc:creator>
      <dc:date>2012-04-02T22:48:58Z</dc:date>
    </item>
  </channel>
</rss>

