<?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: Mapping date from big file with date format in epoch milliseconds. in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Mapping-date-from-big-file-with-date-format-in-epoch/m-p/223236#M96330</link>
    <description>&lt;P&gt;if your data timestamp, for example - &lt;/P&gt;

&lt;P&gt;TIME:1459495744806&lt;/P&gt;

&lt;P&gt;To extract that timestamp, add this stanza in props.conf:&lt;/P&gt;

&lt;P&gt;[host::foo]&lt;BR /&gt;
TIME_PREFIX = TIME: &lt;BR /&gt;
TIME_FORMAT=%s%3N&lt;/P&gt;

&lt;P&gt;%s -- for Epoch (10 digits) and %3N for milli-seconds&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.3/Data/Configuretimestamprecognition" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.3/Data/Configuretimestamprecognition&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;if you are having "1459495744806" inside an event and query and convert it to required timestamp - &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | fields - _time | eval timeTest = "1474993609302"
 | eval timeStamp=strptime(timeTest,"%s%3N") 
 | eval timeStamp=strftime(timeStamp,"%m/%d/%Y:%H:%M:%S") 
| table timeStamp
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/162181-strptime.jpg" alt="alt text" /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 11:13:21 GMT</pubDate>
    <dc:creator>inventsekar</dc:creator>
    <dc:date>2020-09-29T11:13:21Z</dc:date>
    <item>
      <title>Mapping date from big file with date format in epoch milliseconds.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Mapping-date-from-big-file-with-date-format-in-epoch/m-p/223235#M96329</link>
      <description>&lt;P&gt;I have a nice CEF file that parses quite nicely except the date is burred deep in the file and is in epoch milliseconds. The field name is start, how do I make that my datetime stamp when this indexes.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 15:55:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Mapping-date-from-big-file-with-date-format-in-epoch/m-p/223235#M96329</guid>
      <dc:creator>brent_weaver</dc:creator>
      <dc:date>2016-09-27T15:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping date from big file with date format in epoch milliseconds.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Mapping-date-from-big-file-with-date-format-in-epoch/m-p/223236#M96330</link>
      <description>&lt;P&gt;if your data timestamp, for example - &lt;/P&gt;

&lt;P&gt;TIME:1459495744806&lt;/P&gt;

&lt;P&gt;To extract that timestamp, add this stanza in props.conf:&lt;/P&gt;

&lt;P&gt;[host::foo]&lt;BR /&gt;
TIME_PREFIX = TIME: &lt;BR /&gt;
TIME_FORMAT=%s%3N&lt;/P&gt;

&lt;P&gt;%s -- for Epoch (10 digits) and %3N for milli-seconds&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.3/Data/Configuretimestamprecognition" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.3/Data/Configuretimestamprecognition&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;if you are having "1459495744806" inside an event and query and convert it to required timestamp - &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | fields - _time | eval timeTest = "1474993609302"
 | eval timeStamp=strptime(timeTest,"%s%3N") 
 | eval timeStamp=strftime(timeStamp,"%m/%d/%Y:%H:%M:%S") 
| table timeStamp
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/162181-strptime.jpg" alt="alt text" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:13:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Mapping-date-from-big-file-with-date-format-in-epoch/m-p/223236#M96330</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2020-09-29T11:13:21Z</dc:date>
    </item>
  </channel>
</rss>

