Splunk Dev

Convert "20180328212007.496740+180" to human readable format?

test_qweqwe
Builder

Hi.
How to convert "20180328212007.496740+180" to human readable format?
And if possible without ignores the time zone offset (+180)?

Tags (1)
0 Karma

deepashri_123
Motivator

hey@test_qweqwe,

This does not look like an epoch.
Can you try this:
eval time=strftime(strptime("yourtime","%Y%m%d%H%M%S.%6Q+%Ez"),"%Y/%m/%d %H:%M:%S")

Let me know if this helps!!

test_qweqwe
Builder

I have No results found.

InstallDate="20170901111017.000000+180"
LastBootUpTime="20180314062957.183621+120"

| eval LastBootUpTime=strftime(strptime("LastBootUpTime","%Y%m%d%H%M%S.%6Q+%Ez"),"%Y/%m/%d %H:%M:%S")

0 Karma

ckeller2791
Explorer

This worked for me.

|eval LastBoot=strftime(strptime(LastBootUpTime,"%Y%m%d%H%M%S.%N%Z"),"%Y/%m/%d %H:%M:%S")

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...