<?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: fieldformat  command giving error in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/fieldformat-command-giving-error/m-p/59361#M14619</link>
    <description>&lt;P&gt;For some reason, I didn't get an email for this comment. I tried | eval start_time=_time|fieldformat start_time = strftime(start_time,"%m/%d/%Y %k:%M") but this didn't work either. Its giving the same error. Thanks a lot. &lt;/P&gt;

&lt;P&gt;I can use "sort" to order the results but that will do it one time. I wanted to let the user sort the results using up/down arrows provided by the simpleResultsTable.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 09:50:09 GMT</pubDate>
    <dc:creator>sscandoit</dc:creator>
    <dc:date>2020-09-28T09:50:09Z</dc:date>
    <item>
      <title>fieldformat  command giving error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/fieldformat-command-giving-error/m-p/59357#M14615</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am using Splunk 4.1.2. I am trying to use fieldformat to format the _time to avoid converting it to string. Following is my search string:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="someindex" sourcetype="log" | fieldformat mytime=strftime(_time,"%m/%d/%Y %k:%M") | table mytime, account_id
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However I am getting the following error:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Search operation 'fieldformat' is&lt;BR /&gt;
unknown. You might not have permission&lt;BR /&gt;
to run this operation.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;I think I am missing something here. Appreciate all the help I have got on this forum.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Suvelee&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2011 15:48:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/fieldformat-command-giving-error/m-p/59357#M14615</guid>
      <dc:creator>sscandoit</dc:creator>
      <dc:date>2011-08-17T15:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: fieldformat  command giving error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/fieldformat-command-giving-error/m-p/59358#M14616</link>
      <description>&lt;P&gt;use "convert", try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="someindex" sourcetype="log" | convert timeformat="%m/%d/%Y %k:%M" ctime(_time) AS mytime |table mytime, account_id
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;the function "ctime" is for converting epoch time to ascii.  Hope it helps!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2011 05:06:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/fieldformat-command-giving-error/m-p/59358#M14616</guid>
      <dc:creator>bbingham</dc:creator>
      <dc:date>2011-08-18T05:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: fieldformat  command giving error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/fieldformat-command-giving-error/m-p/59359#M14617</link>
      <description>&lt;P&gt;Thanks for the reply. I had used convert before. But it doesn't sort the timestamp in the results table. So to preserve the timestamp I tried using fieldformat.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2011 19:11:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/fieldformat-command-giving-error/m-p/59359#M14617</guid>
      <dc:creator>sscandoit</dc:creator>
      <dc:date>2011-08-18T19:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: fieldformat  command giving error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/fieldformat-command-giving-error/m-p/59360#M14618</link>
      <description>&lt;P&gt;You can also pipe to "sort" to order it how you'd like, but try this:&lt;/P&gt;

&lt;P&gt;| eval start_time=_time|fieldformat start_time = strftime(start_time,"%m/%d/%Y %k:%M")&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:48:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/fieldformat-command-giving-error/m-p/59360#M14618</guid>
      <dc:creator>bbingham</dc:creator>
      <dc:date>2020-09-28T09:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: fieldformat  command giving error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/fieldformat-command-giving-error/m-p/59361#M14619</link>
      <description>&lt;P&gt;For some reason, I didn't get an email for this comment. I tried | eval start_time=_time|fieldformat start_time = strftime(start_time,"%m/%d/%Y %k:%M") but this didn't work either. Its giving the same error. Thanks a lot. &lt;/P&gt;

&lt;P&gt;I can use "sort" to order the results but that will do it one time. I wanted to let the user sort the results using up/down arrows provided by the simpleResultsTable.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:50:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/fieldformat-command-giving-error/m-p/59361#M14619</guid>
      <dc:creator>sscandoit</dc:creator>
      <dc:date>2020-09-28T09:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: fieldformat  command giving error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/fieldformat-command-giving-error/m-p/59362#M14620</link>
      <description>&lt;P&gt;The &lt;CODE&gt;fieldformat&lt;/CODE&gt; search command isn't supported until Splunk 4.2.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2012 17:45:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/fieldformat-command-giving-error/m-p/59362#M14620</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2012-01-19T17:45:30Z</dc:date>
    </item>
  </channel>
</rss>

