<?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: Extract timestamp in  Epoch (milliseconds) to date in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Extract-timestamp-in-Epoch-milliseconds-to-date/m-p/16259#M1935</link>
    <description>&lt;P&gt;Got it was simple enough!&lt;/P&gt;

&lt;P&gt;The fact that it was one long integer dissuaded me from using %3N in combination to %s. But it works !&lt;/P&gt;

&lt;P&gt;Below will parse timestamps with epoch time in milliseconds e.e. 1459495744806&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT=%s%3N
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 04 Apr 2016 16:18:41 GMT</pubDate>
    <dc:creator>stanwin</dc:creator>
    <dc:date>2016-04-04T16:18:41Z</dc:date>
    <item>
      <title>Extract timestamp in  Epoch (milliseconds) to date</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-timestamp-in-Epoch-milliseconds-to-date/m-p/16253#M1929</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am currently extracting a field from some event which looks like&lt;/P&gt;

&lt;P&gt;Start_Time_&lt;EM&gt;ms&lt;/EM&gt;=1277221722297&lt;/P&gt;

&lt;P&gt;My event has no timestamp and this is the only time-related data I have, so I am trying to convert this to a readable date format (ie mm/dd/yy hh:mm:ss). I noticed that people have asked similar questions but all the answers seems to suggest to do this within the search command. However I was hoping to manipulate this number in a config file so that I would have a timestamp for my events. Are these types of operations possible? Or do I need to pre-process the data (again :&amp;lt; )? It would be cool if Splunk supported converting Epoch -&amp;gt; to date.&lt;/P&gt;

&lt;P&gt;well thanks in advance.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Jun 2010 05:43:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-timestamp-in-Epoch-milliseconds-to-date/m-p/16253#M1929</guid>
      <dc:creator>hiwell</dc:creator>
      <dc:date>2010-06-26T05:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: Extract timestamp in  Epoch (milliseconds) to date</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-timestamp-in-Epoch-milliseconds-to-date/m-p/16254#M1930</link>
      <description>&lt;P&gt;Is this "How can i get splunk to identify the time of an event by a timestamp in seconds from epoch?"&lt;/P&gt;

&lt;P&gt;If that's the question, the answer is&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT=%s
TIME_PREFIX=Start_Time_ms=
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Err update:  what I gave will pull seconds from epoch, not milliseconds.  I don't know if our extractor will  give the right answer for milliseconds.  It might just pull the first n digits, but could be off for very old timestamps.  I haven't tested.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Jun 2010 05:46:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-timestamp-in-Epoch-milliseconds-to-date/m-p/16254#M1930</guid>
      <dc:creator>jrodman</dc:creator>
      <dc:date>2010-06-26T05:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Extract timestamp in  Epoch (milliseconds) to date</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-timestamp-in-Epoch-milliseconds-to-date/m-p/16255#M1931</link>
      <description>&lt;P&gt;More detail here: &lt;A href="http://www.splunk.com/base/Documentation/latest/Admin/Configuretimestamprecognition#Configure_timestamps"&gt;http://www.splunk.com/base/Documentation/latest/Admin/Configuretimestamprecognition#Configure_timestamps&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Jun 2010 05:54:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-timestamp-in-Epoch-milliseconds-to-date/m-p/16255#M1931</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-06-26T05:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: Extract timestamp in  Epoch (milliseconds) to date</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-timestamp-in-Epoch-milliseconds-to-date/m-p/16256#M1932</link>
      <description>&lt;P&gt;Splunk recognizes epoch time in my tests. Now the milliseconds piece is tougher. Maybe passing through sed at index time?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[wanky_logs]
SEDCMD-inseconds = s/Start_Time_ms=(\d{10})(\d{3})/\1.\2/
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If the timestamp isn't the first thing in the log file, you'll need to specify the TIME_PREFIX possibly.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2010 04:17:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-timestamp-in-Epoch-milliseconds-to-date/m-p/16256#M1932</guid>
      <dc:creator>twinspop</dc:creator>
      <dc:date>2010-06-29T04:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: Extract timestamp in  Epoch (milliseconds) to date</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-timestamp-in-Epoch-milliseconds-to-date/m-p/16257#M1933</link>
      <description>&lt;P&gt;Sorry, timestamp extraction is before the SEDCMD fires, so this won't work.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2010 04:55:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-timestamp-in-Epoch-milliseconds-to-date/m-p/16257#M1933</guid>
      <dc:creator>twinspop</dc:creator>
      <dc:date>2010-06-29T04:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: Extract timestamp in  Epoch (milliseconds) to date</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-timestamp-in-Epoch-milliseconds-to-date/m-p/16258#M1934</link>
      <description>&lt;P&gt;Well SPLUNK (v 6.2.3 ) with automatic timestamp recognition parses the timestamp ( epoch in milliseconds), but there is no strptime equivalent for that so I cant specify custom timestamp extraction.&lt;/P&gt;

&lt;P&gt;The current version %s  supports Epoch with  10 digits only.&lt;/P&gt;

&lt;P&gt;Using %s to parse the epoch time ( in miliseconds) gives a gibberish date..  Its just hit the max of 10 digit epoch i think.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; epoch:  1459495744806
     extracted timestamp: 31/12/9999 23:59:59.999
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So if I have a epoch in milliseconds appears automatic timestamp extraction is the only way as of now than?&lt;/P&gt;

&lt;P&gt;here is the difference between them:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    1459495744806
    GMT: Fri, 01 Apr 2016 07:29:04.806 GMT

    1459495744
    GMT: Fri, 01 Apr 2016 07:29:04 GMT
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Apr 2016 14:05:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-timestamp-in-Epoch-milliseconds-to-date/m-p/16258#M1934</guid>
      <dc:creator>stanwin</dc:creator>
      <dc:date>2016-04-04T14:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: Extract timestamp in  Epoch (milliseconds) to date</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-timestamp-in-Epoch-milliseconds-to-date/m-p/16259#M1935</link>
      <description>&lt;P&gt;Got it was simple enough!&lt;/P&gt;

&lt;P&gt;The fact that it was one long integer dissuaded me from using %3N in combination to %s. But it works !&lt;/P&gt;

&lt;P&gt;Below will parse timestamps with epoch time in milliseconds e.e. 1459495744806&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT=%s%3N
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Apr 2016 16:18:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-timestamp-in-Epoch-milliseconds-to-date/m-p/16259#M1935</guid>
      <dc:creator>stanwin</dc:creator>
      <dc:date>2016-04-04T16:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: Extract timestamp in  Epoch (milliseconds) to date</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-timestamp-in-Epoch-milliseconds-to-date/m-p/16260#M1936</link>
      <description>&lt;P&gt;I downvoted this post because this isn't the correct answer for milliseconds as the question asked.&lt;BR /&gt;
The documentation in &lt;A href="https://docs.splunk.com/Documentation/Splunk/6.5.3/Data/Configuretimestamprecognition"&gt;Splunk documentation for timestamp recognition&lt;/A&gt; identifies that you can use either &lt;BR /&gt;
&lt;CODE&gt;TIME_FORMAT=%s%3N&lt;/CODE&gt;&lt;BR /&gt;
or&lt;BR /&gt;
&lt;CODE&gt;TIME_FORMAT=%s%Q&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2017 07:16:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-timestamp-in-Epoch-milliseconds-to-date/m-p/16260#M1936</guid>
      <dc:creator>drutstein</dc:creator>
      <dc:date>2017-06-15T07:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: Extract timestamp in  Epoch (milliseconds) to date</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-timestamp-in-Epoch-milliseconds-to-date/m-p/16261#M1937</link>
      <description>&lt;P&gt;I downvoted this post because %s is not the right format for milliseconds. this will cause you errors&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 03:19:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-timestamp-in-Epoch-milliseconds-to-date/m-p/16261#M1937</guid>
      <dc:creator>morethanyell</dc:creator>
      <dc:date>2019-06-07T03:19:58Z</dc:date>
    </item>
  </channel>
</rss>

