<?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 include indexTime in output file in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/include-indexTime-in-output-file/m-p/63549#M180305</link>
    <description>&lt;P&gt;I am looking to include the indexTime in my output file and then append that that field to an existing 'CreateTimeStamp' field. What is the best method to extract indexTime (or recentTime)?&lt;/P&gt;</description>
    <pubDate>Wed, 30 May 2012 14:16:02 GMT</pubDate>
    <dc:creator>efelder0</dc:creator>
    <dc:date>2012-05-30T14:16:02Z</dc:date>
    <item>
      <title>include indexTime in output file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/include-indexTime-in-output-file/m-p/63549#M180305</link>
      <description>&lt;P&gt;I am looking to include the indexTime in my output file and then append that that field to an existing 'CreateTimeStamp' field. What is the best method to extract indexTime (or recentTime)?&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2012 14:16:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/include-indexTime-in-output-file/m-p/63549#M180305</guid>
      <dc:creator>efelder0</dc:creator>
      <dc:date>2012-05-30T14:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: include indexTime in output file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/include-indexTime-in-output-file/m-p/63550#M180306</link>
      <description>&lt;P&gt;Not sure what your "output file" is, but here goes:&lt;/P&gt;

&lt;P&gt;The time an event was indexed is available in the field &lt;CODE&gt;_indextime&lt;/CODE&gt;. You might have some problems with actually viewing it because it's by default a purely internal field that isn't shown to users. You can however make it visible by &lt;CODE&gt;eval&lt;/CODE&gt;:ing it:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ... | eval indextime=_indextime
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;After that you can just include the &lt;CODE&gt;indextime&lt;/CODE&gt; field in whatever output you need.&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2012 14:36:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/include-indexTime-in-output-file/m-p/63550#M180306</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-05-30T14:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: include indexTime in output file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/include-indexTime-in-output-file/m-p/63551#M180307</link>
      <description>&lt;P&gt;Ayn, I combined this with your other answer&lt;BR /&gt;
&lt;A href="http://splunk-base.splunk.com/answer_link/41401/"&gt;http://splunk-base.splunk.com/answer_link/41401/&lt;/A&gt;&lt;BR /&gt;
about getting readable times, to get&lt;BR /&gt;
  | eval indextime=strftime(_indextime,"%+")&lt;/P&gt;

&lt;P&gt;Thanks for both excellent answers!&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2012 16:56:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/include-indexTime-in-output-file/m-p/63551#M180307</guid>
      <dc:creator>mslvrstn</dc:creator>
      <dc:date>2012-08-29T16:56:39Z</dc:date>
    </item>
  </channel>
</rss>

