<?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: OutputCSV result is different than Splunk display in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/OutputCSV-result-is-different-than-Splunk-display/m-p/169118#M3683</link>
    <description>&lt;P&gt;Field names with "_"'s in them are internal fields in Splunk. Outcsv is ouputing those as you have not formatted the search to only use those fields. So your search should be:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(CALL_STOPPED OR CALL_SUCCESSFUL) COMLib earliest=11/11/2014:00:00:00 | timechart span=1d count AS "Calls"| table _time Calls | outputcsv result.csv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That will output to csv the proper fields you want to see.&lt;/P&gt;</description>
    <pubDate>Wed, 24 Dec 2014 05:20:21 GMT</pubDate>
    <dc:creator>esix_splunk</dc:creator>
    <dc:date>2014-12-24T05:20:21Z</dc:date>
    <item>
      <title>OutputCSV result is different than Splunk display</title>
      <link>https://community.splunk.com/t5/Reporting/OutputCSV-result-is-different-than-Splunk-display/m-p/169117#M3682</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I've tried to query search command on Splunk which is &lt;CODE&gt;(CALL_STOPPED OR CALL_SUCCESSFUL) COMLib earliest=11/11/2014:00:00:00 | timechart span=1d count AS "Calls"&lt;/CODE&gt;The result display in Splunk will be two columns ( _time, Calls).&lt;/P&gt;

&lt;P&gt;Eg. _time                       Calls&lt;BR /&gt;
      2014-11-11             30&lt;/P&gt;

&lt;P&gt;But when I tried to export to CSV via this command &lt;CODE&gt;(CALL_STOPPED OR CALL_SUCCESSFUL) COMLib earliest=11/11/2014:00:00:00 | timechart span=1d count AS "Calls"| outputcsv result.csv&lt;/CODE&gt;, the CSV will display another format.&lt;/P&gt;

&lt;P&gt;Eg. _time          Calls    _span   _spandays&lt;BR /&gt;
       1415635200   0           86400   1&lt;/P&gt;

&lt;P&gt;Can I know why this happening?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Dec 2014 04:51:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/OutputCSV-result-is-different-than-Splunk-display/m-p/169117#M3682</guid>
      <dc:creator>mhng</dc:creator>
      <dc:date>2014-12-24T04:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: OutputCSV result is different than Splunk display</title>
      <link>https://community.splunk.com/t5/Reporting/OutputCSV-result-is-different-than-Splunk-display/m-p/169118#M3683</link>
      <description>&lt;P&gt;Field names with "_"'s in them are internal fields in Splunk. Outcsv is ouputing those as you have not formatted the search to only use those fields. So your search should be:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(CALL_STOPPED OR CALL_SUCCESSFUL) COMLib earliest=11/11/2014:00:00:00 | timechart span=1d count AS "Calls"| table _time Calls | outputcsv result.csv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That will output to csv the proper fields you want to see.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Dec 2014 05:20:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/OutputCSV-result-is-different-than-Splunk-display/m-p/169118#M3683</guid>
      <dc:creator>esix_splunk</dc:creator>
      <dc:date>2014-12-24T05:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: OutputCSV result is different than Splunk display</title>
      <link>https://community.splunk.com/t5/Reporting/OutputCSV-result-is-different-than-Splunk-display/m-p/169119#M3684</link>
      <description>&lt;P&gt;Thanks esix_splunk,&lt;/P&gt;

&lt;P&gt;One more question, the CSV file has output column I needed. However, on the _time column is still show 1415635200 value, instead of the date(e.g. 2014-11-11). Any comments for this issue?&lt;/P&gt;</description>
      <pubDate>Thu, 25 Dec 2014 04:17:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/OutputCSV-result-is-different-than-Splunk-display/m-p/169119#M3684</guid>
      <dc:creator>mhng</dc:creator>
      <dc:date>2014-12-25T04:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: OutputCSV result is different than Splunk display</title>
      <link>https://community.splunk.com/t5/Reporting/OutputCSV-result-is-different-than-Splunk-display/m-p/169120#M3685</link>
      <description>&lt;P&gt;That's the underlying timestamp representation as unix timestamps. You can format that manually if needed, for example &lt;CODE&gt;... |fieldformat field = strftime(field, "%F %T.%3N")&lt;/CODE&gt; will give you a date and time in human-readable format. All Splunk commands such as &lt;CODE&gt;timechart&lt;/CODE&gt; work off the unix timestamp though, so format at the very end if needed. Additionally, the &lt;CODE&gt;_time&lt;/CODE&gt; field should usually be formatted according to your browser's locale automatically.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Dec 2014 04:33:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/OutputCSV-result-is-different-than-Splunk-display/m-p/169120#M3685</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-12-25T04:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: OutputCSV result is different than Splunk display</title>
      <link>https://community.splunk.com/t5/Reporting/OutputCSV-result-is-different-than-Splunk-display/m-p/169121#M3686</link>
      <description>&lt;P&gt;As Martin points out, you want to change the epoch(unix) time format to human readable. Your search should become something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; (CALL_STOPPED OR CALL_SUCCESSFUL) COMLib earliest=11/11/2014:00:00:00 | timechart span=1d count AS "Calls" | eval _time=humanreadabletime  | fieldformat humanreadabletime = strftime(humanreadabletime, "%F %T.%3N") | table humanreadabletime Calls |  outputcsv result.csv
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Dec 2014 05:10:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/OutputCSV-result-is-different-than-Splunk-display/m-p/169121#M3686</guid>
      <dc:creator>esix_splunk</dc:creator>
      <dc:date>2014-12-25T05:10:03Z</dc:date>
    </item>
  </channel>
</rss>

