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!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...