Getting Data In

epoch _time conversion

_dave_b
Communicator

Hello,

I'm trying to retrieve a readable time value from a time stamp, so I ran this command:

eval "Time of most recent Update"=tostring(_time,"duration") 

and I get back a value like this:

16723+03:58:46.647379

when _time is originally 2015 10-14 23:10:54.111
This looks suspect to me. Is 16723+03:58:46.647379 the correct value? How do I interpret it?

Thanks

0 Karma
1 Solution

sundareshr
Legend

duration is time in seconds. For a human readable time format, look at strftime() In you example strftime(_time, "%Y %M%D") would give you 2015 10 14.

View solution in original post

0 Karma

sundareshr
Legend

duration is time in seconds. For a human readable time format, look at strftime() In you example strftime(_time, "%Y %M%D") would give you 2015 10 14.

0 Karma

_dave_b
Communicator

Thanks! That helped a lot

0 Karma
Get Updates on the Splunk Community!

Splunk Enterprise Security(ES) 7.3 is approaching the end of support. Get ready for ...

Hi friends!    At Splunk, your product success is our top priority. With Enterprise Security (ES), we're here ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk, and empower your SOC to reach new heights! Duration: 1 hour  Prepare to ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...