<?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: _time not displaying correctly in the output in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/time-not-displaying-correctly-in-the-output/m-p/479552#M134399</link>
    <description>&lt;P&gt;@Shashank_87,&lt;/P&gt;

&lt;P&gt;Splunk understands &lt;CODE&gt;_time&lt;/CODE&gt; and it formats the value to a readable string but your ETL server doesn't. If you are not doing any further time calculation using the result, suggest to format it as string and use the value in the result&lt;/P&gt;

&lt;P&gt;eg. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"your current search" |eval Time=strftime(_time,"%a %b %d %H:%M:%S %Y")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 07 Nov 2019 12:54:25 GMT</pubDate>
    <dc:creator>renjith_nair</dc:creator>
    <dc:date>2019-11-07T12:54:25Z</dc:date>
    <item>
      <title>_time not displaying correctly in the output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/time-not-displaying-correctly-in-the-output/m-p/479551#M134398</link>
      <description>&lt;P&gt;Hi, I have generated a report which contains _time column in a tabular format but it is displaying differently with different actions.&lt;BR /&gt;
For example,&lt;BR /&gt;
1. if i schedule that report as an email, I get _time displayed like this in the csv report - Wed Nov  6 23:59:57 2019&lt;BR /&gt;
_time,siteReference,addressIdentifier,UPRN,serviceabilityOutcome&lt;BR /&gt;
Sun Sep 15 23:59:58 2019,,,100050529544,UnServiceable&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;If i schedule that report to configure as SFTP and send it on one of the ETL server it is displayed like this - I don't know how double quotes came into picture. I want this to be same as above format.
"_time",siteReference,addressIdentifier,UPRN,serviceabilityOutcome
"1573127879.336",20,6985807,,UnServiceable&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Can someone help me with changing the proper format of _time field for the 2nd scenario?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 12:26:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/time-not-displaying-correctly-in-the-output/m-p/479551#M134398</guid>
      <dc:creator>Shashank_87</dc:creator>
      <dc:date>2019-11-07T12:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: _time not displaying correctly in the output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/time-not-displaying-correctly-in-the-output/m-p/479552#M134399</link>
      <description>&lt;P&gt;@Shashank_87,&lt;/P&gt;

&lt;P&gt;Splunk understands &lt;CODE&gt;_time&lt;/CODE&gt; and it formats the value to a readable string but your ETL server doesn't. If you are not doing any further time calculation using the result, suggest to format it as string and use the value in the result&lt;/P&gt;

&lt;P&gt;eg. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"your current search" |eval Time=strftime(_time,"%a %b %d %H:%M:%S %Y")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Nov 2019 12:54:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/time-not-displaying-correctly-in-the-output/m-p/479552#M134399</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-11-07T12:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: _time not displaying correctly in the output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/time-not-displaying-correctly-in-the-output/m-p/479553#M134400</link>
      <description>&lt;P&gt;The &lt;CODE&gt;_time&lt;/CODE&gt; field is very special in that it has an automatic &lt;CODE&gt;fieldformat&lt;/CODE&gt; attached to it (see docs).  When presented through the Splunk GUI, it will be pretty/human formatted but underneath, in reality, it is the integer that you see when dumping it to a file.  You can see this if you rename or copy &lt;CODE&gt;_time&lt;/CODE&gt; like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval Time=_time | rename _time as time | table time Time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Nov 2019 12:55:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/time-not-displaying-correctly-in-the-output/m-p/479553#M134400</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-11-07T12:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: _time not displaying correctly in the output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/time-not-displaying-correctly-in-the-output/m-p/479554#M134401</link>
      <description>&lt;P&gt;Hi @renjith.nair , yes that's perfect. That's what i used and now displaying it fine but I don't know why the double quotes are coming when i am checking the file on the server. And those double quotes are coming only on the _time column -&lt;/P&gt;

&lt;P&gt;test@server1$ head -5 Daily_Report-_2019-11-07.csv&lt;BR /&gt;
"_time",siteReference,address,number,status&lt;BR /&gt;
"Thu Nov 07 14:10:56 2019",20,6922311,,working&lt;/P&gt;

&lt;P&gt;This is the query i used -&lt;BR /&gt;
| eval _time=strftime(_time, "%a %b %d %H:%M:%S %Y")&lt;BR /&gt;
| table _time siteReference address number status&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:53:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/time-not-displaying-correctly-in-the-output/m-p/479554#M134401</guid>
      <dc:creator>Shashank_87</dc:creator>
      <dc:date>2020-09-30T02:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: _time not displaying correctly in the output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/time-not-displaying-correctly-in-the-output/m-p/479555#M134402</link>
      <description>&lt;P&gt;@Shashank_87, most probably it's due to the presence of special characters in the result, in your case time has  ":" in it. You may test it with other characters as well (space,. , etc)&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 15:34:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/time-not-displaying-correctly-in-the-output/m-p/479555#M134402</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-11-07T15:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: _time not displaying correctly in the output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/time-not-displaying-correctly-in-the-output/m-p/479556#M134403</link>
      <description>&lt;P&gt;Add this to the end of your search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|convert ctime(_time)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Nov 2019 15:40:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/time-not-displaying-correctly-in-the-output/m-p/479556#M134403</guid>
      <dc:creator>arjunpkishore5</dc:creator>
      <dc:date>2019-11-07T15:40:35Z</dc:date>
    </item>
  </channel>
</rss>

