<?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 Convert TimeFormat in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Convert-TimeFormat/m-p/58493#M14323</link>
    <description>&lt;P&gt;I have an event field called `LastBootUpTime=20120119121719.125000-360'&lt;/P&gt;

&lt;P&gt;I am trying to convert this to a more readable format by using this convert command&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| convert timeformat="%m-%d-%Y %H:%M:%S" ctime(LastBootUpTime) AS BootTime
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;this is not working.  What am I missing??&lt;/P&gt;</description>
    <pubDate>Thu, 26 Jan 2012 18:25:38 GMT</pubDate>
    <dc:creator>hartfoml</dc:creator>
    <dc:date>2012-01-26T18:25:38Z</dc:date>
    <item>
      <title>Convert TimeFormat</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Convert-TimeFormat/m-p/58493#M14323</link>
      <description>&lt;P&gt;I have an event field called `LastBootUpTime=20120119121719.125000-360'&lt;/P&gt;

&lt;P&gt;I am trying to convert this to a more readable format by using this convert command&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| convert timeformat="%m-%d-%Y %H:%M:%S" ctime(LastBootUpTime) AS BootTime
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;this is not working.  What am I missing??&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2012 18:25:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Convert-TimeFormat/m-p/58493#M14323</guid>
      <dc:creator>hartfoml</dc:creator>
      <dc:date>2012-01-26T18:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: Convert TimeFormat</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Convert-TimeFormat/m-p/58494#M14324</link>
      <description>&lt;P&gt;If I'm not wrong, convert needs epoch time for ctime().&lt;BR /&gt;
So use strptime to convert to epoch time this first:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval temp=strptime(LastBootUpTime,"%Y%m%d%H%M%S") | convert timeformat="%m-%d-%Y %H:%M:%S" ctime(temp) AS BootTime
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will return BootTime in a human readable format, as specified in the timeformat parameter.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2012 19:20:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Convert-TimeFormat/m-p/58494#M14324</guid>
      <dc:creator>bojanz</dc:creator>
      <dc:date>2012-01-26T19:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: Convert TimeFormat</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Convert-TimeFormat/m-p/58495#M14325</link>
      <description>&lt;P&gt;That was the answer... howd you get so smart &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2012 19:25:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Convert-TimeFormat/m-p/58495#M14325</guid>
      <dc:creator>hartfoml</dc:creator>
      <dc:date>2012-01-26T19:25:40Z</dc:date>
    </item>
  </channel>
</rss>

