<?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: How to convert epoch time to human readable format in search query? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/512272#M143669</link>
    <description>&lt;P&gt;Thats Correct.&lt;/P&gt;&lt;P&gt;|eval start=strftime(viewingPeriodStart/1000,"%a,%d %b %Y %H:%M:%S")&lt;/P&gt;&lt;P&gt;|eval end=strftime(viewingPeriodEnd/1000,"%a,%d %b %Y %H:%M:%S")&lt;/P&gt;&lt;P&gt;Also, How do i find difference between 2 times in hrs?&lt;/P&gt;</description>
    <pubDate>Tue, 04 Aug 2020 06:36:55 GMT</pubDate>
    <dc:creator>vijaysubramania</dc:creator>
    <dc:date>2020-08-04T06:36:55Z</dc:date>
    <item>
      <title>How to convert epoch time to human readable format in search query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176771#M50785</link>
      <description>&lt;P&gt;Could someone please help me convert epoch time to human readable time?&lt;/P&gt;

&lt;P&gt;"time":1407361408100&lt;/P&gt;

&lt;P&gt;this is what i'm trying to get "time":"Wed, 06 Aug 2014 21:43:28"&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2014 19:14:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176771#M50785</guid>
      <dc:creator>ziyod2005</dc:creator>
      <dc:date>2014-08-08T19:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert epoch time to human readable format in search query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176772#M50786</link>
      <description>&lt;P&gt;Where are you trying to convert this?&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2014 19:24:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176772#M50786</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-08-08T19:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert epoch time to human readable format in search query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176773#M50787</link>
      <description>&lt;P&gt;I'm trying to convert  1407361408100  to some human readable format.&lt;/P&gt;

&lt;P&gt;I've tried to used convert function but not getting the correct result&lt;BR /&gt;
sourcetype=test | convert timeformat=" %m/%d/%y %H:%M:%S" ctime(log_time) AS c_time | table _time, c_time&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:17:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176773#M50787</guid>
      <dc:creator>ziyod2005</dc:creator>
      <dc:date>2020-09-28T17:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert epoch time to human readable format in search query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176774#M50788</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=test | eval c_time=strftime(log_time,"%m/%d/%y %H:%M:%S") | table _time, c_time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;the function strftime(X,Y) takes an epochtime value, X, as the first argument and renders it as a string using the format specified by Y.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2014 19:38:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176774#M50788</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-08-08T19:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert epoch time to human readable format in search query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176775#M50789</link>
      <description>&lt;P&gt;Issues that I see. &lt;/P&gt;

&lt;P&gt;1) in the timeformat there is an extra space. Remove that&lt;BR /&gt;
2) The field name used in ctime need to be verified. Do you have a field called log_time apart from _time field??&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2014 19:46:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176775#M50789</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-08-08T19:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert epoch time to human readable format in search query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176776#M50790</link>
      <description>&lt;P&gt;Here's what I'm getting &lt;BR /&gt;
1406263182098   12/31/99 23:59:59&lt;/P&gt;

&lt;P&gt;Instead I should be getting:&lt;/P&gt;

&lt;P&gt;GMT: Fri, 25 Jul 2014 04:39:42 GMT&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2014 19:49:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176776#M50790</guid>
      <dc:creator>ziyod2005</dc:creator>
      <dc:date>2014-08-08T19:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert epoch time to human readable format in search query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176777#M50791</link>
      <description>&lt;P&gt;Here is my actual query&lt;/P&gt;

&lt;P&gt;source = "*.job" | eval c_time=strftime(time,"%m/%d/%y %H:%M:%S") | table time, c_time&lt;/P&gt;

&lt;P&gt;time field does exist and that's the field that I'm trying to convert&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:18:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176777#M50791</guid>
      <dc:creator>ziyod2005</dc:creator>
      <dc:date>2020-09-28T17:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert epoch time to human readable format in search query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176778#M50792</link>
      <description>&lt;P&gt;Use "%a,%d %b %Y %H:%M:%S" instead of "%m/%d/%y %H:%M:%S %Z".&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2014 19:56:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176778#M50792</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-08-08T19:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert epoch time to human readable format in search query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176779#M50793</link>
      <description>&lt;P&gt;Milliseconds to blame? &lt;CODE&gt;%3N&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2014 20:05:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176779#M50793</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2014-08-08T20:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert epoch time to human readable format in search query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176780#M50794</link>
      <description>&lt;P&gt;I think we're getting close &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;BR /&gt;
1406263182098   Fri,31 Dec 9999 23:59:59&lt;BR /&gt;
1406263177094   Fri,31 Dec 9999 23:59:59&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2014 21:11:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176780#M50794</guid>
      <dc:creator>ziyod2005</dc:creator>
      <dc:date>2014-08-08T21:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert epoch time to human readable format in search query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176781#M50795</link>
      <description>&lt;P&gt;call me lazy, but ..&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval c_time=strftime(log_time,"%F %T")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Sep 2014 12:29:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176781#M50795</guid>
      <dc:creator>landen99</dc:creator>
      <dc:date>2014-09-17T12:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert epoch time to human readable format in search query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176782#M50796</link>
      <description>&lt;P&gt;I am unable to get this working too. I tried all the options and unable to see date in human readable format.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Nov 2014 11:08:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176782#M50796</guid>
      <dc:creator>arungeorge09</dc:creator>
      <dc:date>2014-11-14T11:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert epoch time to human readable format in search query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176783#M50797</link>
      <description>&lt;P&gt;^^^ This is the answer!&lt;BR /&gt;
 eval c_time=strftime(log_time,"%F %T")&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:53:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176783#M50797</guid>
      <dc:creator>mcronkrite</dc:creator>
      <dc:date>2020-09-28T18:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert epoch time to human readable format in search query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176784#M50798</link>
      <description>&lt;P&gt;@ziyod2005 Can you post your resolution here ? As  i have similar issue... None of posted answers helping me to resolve my issue. Did you ever got your resolution on this question ?&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2015 23:58:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176784#M50798</guid>
      <dc:creator>daivish</dc:creator>
      <dc:date>2015-05-12T23:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert epoch time to human readable format in search query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176785#M50799</link>
      <description>&lt;P&gt;@ziyod2005 -- Can you post the correct Answer if you ever got the solution on this problem?&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2015 23:59:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176785#M50799</guid>
      <dc:creator>daivish</dc:creator>
      <dc:date>2015-05-12T23:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert epoch time to human readable format in search query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176786#M50800</link>
      <description>&lt;P&gt;You have to see what units your epoch time value is in. If it is not working, try dividing the number by 1000 first. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Example:&lt;/P&gt;

&lt;P&gt;|eval log_time=log_time/1000 |eval c_time=strftime(log_time,"%F %T") | table log_time, c_time&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:18:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176786#M50800</guid>
      <dc:creator>mmensch</dc:creator>
      <dc:date>2020-09-29T07:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert epoch time to human readable format in search query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176787#M50801</link>
      <description>&lt;P&gt;Try this &lt;BR /&gt;
| eval Time=strftime(log_time_field/1000, "%d-%m-%Y %H:%M:%S")&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:53:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176787#M50801</guid>
      <dc:creator>Dev_Choudhary</dc:creator>
      <dc:date>2020-09-29T14:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert epoch time to human readable format in search query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176788#M50802</link>
      <description>&lt;P&gt;Downvoted. Considering converting from epoch is one of the &lt;STRONG&gt;most&lt;/STRONG&gt; common Splunk questions of all time, considering this page has 46k views, and considering that each and every answer is entirely incorrect (and the actual question itself is misleading) this page is desperately in need of removal.&lt;/P&gt;

&lt;P&gt;1) The question doesn't actually provide a standard epoch time. A millisecond epoch time is provided&lt;BR /&gt;
2) The answer with 16 votes (?????) fails to divide by 1000 OR provide the correct format&lt;BR /&gt;
3) The answer with 3 votes (?????) fails to provide the correct format&lt;/P&gt;

&lt;P&gt;@somesoni2's comment of &lt;CODE&gt;"%a,%d %b %Y %H:%M:%S"&lt;/CODE&gt;is correct, although technically you need to divide by 1000 if you are to use the millisecond epoch time that the post provides. 99% of people who find this page are merely looking to convert epoch time to the default Splunk human-readable format, in which case what they are looking for is barely on this page. They are most likely looking for &lt;CODE&gt;"%Y-%m-%d %H:%M:%S"&lt;/CODE&gt; which is mentioned nowhere, or possibly &lt;CODE&gt;"%F %T"&lt;/CODE&gt; as mentioned in the comments.&lt;/P&gt;

&lt;P&gt;I've been told that the initial question has not been retroactively edited in any way which begs the question of what happened???? I understand comments from a comment chain were likely converted to answers without the correct context, but still. Part of the problem is that, in the comment chain, the parameters surrounding the initial question were changed by the asker. Smh. This is a giant mess.&lt;/P&gt;

&lt;P&gt;@mstjohn_splunk&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2019 22:15:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/176788#M50802</guid>
      <dc:creator>nick405060</dc:creator>
      <dc:date>2019-02-22T22:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert epoch time to human readable format in search query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/512271#M143668</link>
      <description>&lt;P&gt;This Works. How do I calculate if I want to see the difference between 2 epoch times and displayed in hrs&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2020 06:34:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/512271#M143668</guid>
      <dc:creator>vijaysubramania</dc:creator>
      <dc:date>2020-08-04T06:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert epoch time to human readable format in search query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/512272#M143669</link>
      <description>&lt;P&gt;Thats Correct.&lt;/P&gt;&lt;P&gt;|eval start=strftime(viewingPeriodStart/1000,"%a,%d %b %Y %H:%M:%S")&lt;/P&gt;&lt;P&gt;|eval end=strftime(viewingPeriodEnd/1000,"%a,%d %b %Y %H:%M:%S")&lt;/P&gt;&lt;P&gt;Also, How do i find difference between 2 times in hrs?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2020 06:36:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-epoch-time-to-human-readable-format-in-search/m-p/512272#M143669</guid>
      <dc:creator>vijaysubramania</dc:creator>
      <dc:date>2020-08-04T06:36:55Z</dc:date>
    </item>
  </channel>
</rss>

