<?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: unable to convert epoch fomat to human readable format in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/unable-to-convert-epoch-fomat-to-human-readable-format/m-p/579946#M202066</link>
    <description>&lt;P&gt;Splunk assumes the UNIX time value is in seconds and your value is in milliseconds. When this happens, simply divide by 1000.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval timestamp="1641294227243"
| eval event_time=strftime((timestamp/1000),"%m/%d/%Y %H:%M:%S")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jan 2022 04:14:31 GMT</pubDate>
    <dc:creator>johnhuang</dc:creator>
    <dc:date>2022-01-05T04:14:31Z</dc:date>
    <item>
      <title>unable to convert epoch fomat to human readable format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/unable-to-convert-epoch-fomat-to-human-readable-format/m-p/579940#M202063</link>
      <description>&lt;P&gt;When i convert following timestamp to human readable format i am getting "12/31/9999 23:59:59" instead of '01/04/22 06:03:47'&lt;/P&gt;&lt;P&gt;"timestamp": 1641294227243&lt;/P&gt;&lt;P&gt;I'm using&amp;nbsp;strftime(timestamp,"%m/%d/%Y %H:%M:%S") function for the conversion.&lt;/P&gt;&lt;P&gt;Could you please help me to find out the right conversion method?&lt;/P&gt;&lt;P&gt;Thanks in advance!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 04:00:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/unable-to-convert-epoch-fomat-to-human-readable-format/m-p/579940#M202063</guid>
      <dc:creator>kapoorsumit2020</dc:creator>
      <dc:date>2022-01-05T04:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: unable to convert epoch fomat to human readable format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/unable-to-convert-epoch-fomat-to-human-readable-format/m-p/579946#M202066</link>
      <description>&lt;P&gt;Splunk assumes the UNIX time value is in seconds and your value is in milliseconds. When this happens, simply divide by 1000.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval timestamp="1641294227243"
| eval event_time=strftime((timestamp/1000),"%m/%d/%Y %H:%M:%S")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 04:14:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/unable-to-convert-epoch-fomat-to-human-readable-format/m-p/579946#M202066</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2022-01-05T04:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: unable to convert epoch fomat to human readable format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/unable-to-convert-epoch-fomat-to-human-readable-format/m-p/579948#M202068</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/190794"&gt;@johnhuang&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried as suggested but somehow the value for event_time is coming as blank in our use-case:&lt;/P&gt;&lt;P&gt;Here is sample SPL which i'm using:&lt;/P&gt;&lt;P&gt;index=cloud cloudaccount="account_id" sourcetype=lambda:project_name-sftp-logs-to-splunk "\"logGroup\": \"/aws/transfer/s-serverid\"" "CLOSE Path=\/projectname-bucketname-prd" "a.b.c.d.e.T0600420"&lt;BR /&gt;| rex field=_raw max_match=0 "(?&amp;lt;Sent_At&amp;gt;\d+)[\r\n ,]+\"message\": \"[\w+.]+ CLOSE Path=\/projectname-bucketname-prd[-secure]*\/landing\/[prd\/]*(?&amp;lt;user_id&amp;gt;\w+)\/(?&amp;lt;FILE_NAME&amp;gt;[\w+.#]+) BytesIn=(?&amp;lt;Bytes_In&amp;gt;\d+)"&lt;BR /&gt;| eval event_time=strftime((Sent_At/1000),"%m/%d/%Y %H:%M:%S")&lt;BR /&gt;| table FILE_NAME user_id Bytes_In Sent_At event_time&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Result:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FILE_NAME&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;user_id&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Bytes_In&amp;nbsp; &amp;nbsp; &amp;nbsp;Sent_At&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;event_time&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----------------------------------------------------------------------------------------------&lt;BR /&gt;&lt;/STRONG&gt;a.b.c.d.e.T0600420 user_name 1&amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1641294227380&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sample log events:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2022-01-04T11:04:02.452Z 9e7cf6d7-006a-4aea-8053-2aae3068f5b0 INFO Decoded payload: {&lt;BR /&gt;"messageType": "DATA_MESSAGE",&lt;BR /&gt;"owner": "account_id",&lt;BR /&gt;"logGroup": "/aws/transfer/s-serverid",&lt;BR /&gt;"logStream": "eft_nonprod.7eba87e510990497",&lt;BR /&gt;"subscriptionFilters": [&lt;BR /&gt;"onepi-sftp-logs-to-splunk-filter"&lt;BR /&gt;],&lt;BR /&gt;"logEvents": [&lt;BR /&gt;{&lt;BR /&gt;"id": "36602084357565361730142322725669422549468033150221549568",&lt;BR /&gt;"timestamp": &lt;STRONG&gt;1641294227243,&lt;/STRONG&gt;&lt;BR /&gt;"message": "message-1"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"id": "36602084360419857115554242487785994488367023422987042817",&lt;BR /&gt;"timestamp": &lt;STRONG&gt;1641294227371&lt;/STRONG&gt;,&lt;BR /&gt;"message": "message-2"&lt;BR /&gt;},&lt;BR /&gt;....&lt;BR /&gt;]&lt;BR /&gt;}&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 05:05:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/unable-to-convert-epoch-fomat-to-human-readable-format/m-p/579948#M202068</guid>
      <dc:creator>kapoorsumit2020</dc:creator>
      <dc:date>2022-01-05T05:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: unable to convert epoch fomat to human readable format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/unable-to-convert-epoch-fomat-to-human-readable-format/m-p/579951#M202070</link>
      <description>&lt;P&gt;Your data contains multiple timestamps. Let's try to clean up the field a bit:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval Sent_At=TRIM(MVINDEX(Sent_At,0))
| eval event_time=strftime((Sent_At/1000),"%m/%d/%Y %H:%M:%S")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 05:15:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/unable-to-convert-epoch-fomat-to-human-readable-format/m-p/579951#M202070</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2022-01-05T05:15:24Z</dc:date>
    </item>
  </channel>
</rss>

