Getting Data In
Highlighted

Convert Epoch timestamp

Builder

I am trying to convert epoch timestamp of stopTime into %m/%d/%Y %H:%M:%S , but I am getting 12/31/9999 23:59:59

"traceId":xxxxx,"startTime":1395740488120,"stopTime":1395740497550

This is what I am using -

rex "^(?:[^:\n]*:){3}(?P<endtime>\d+)" | eval StopTime=strftime(endtime, "%m/%d/%Y %H:%M:%S")

Could someone please let me know what could be the problem?

TIA

0 Karma
Highlighted

Re: Convert Epoch timestamp

Builder

Hi,

Are you using the time in millisecond format? Please see following time comparison:
1427110824 - Epoch time for today
1395740497550

If you divide endtime by 1000, it should work fine.

Thanks!

View solution in original post

0 Karma