Dashboards & Visualizations

How to convert _time to a human readable format and display Time and Date in a single value panel?

jclehmuth
Path Finder

This sounds easy but I can't seem to figure it out. I'm creating an "Admin" dashboard and a couple of the panels are time last "x" tool ran. The most recent event received from host "x" is what I need to retrieve a time stamp from and post it in a panel.

Currently I have this
host ="10.0.33.210" | chart first(_time)

which outputs : 1418565983

How do I convert that into readable time and date?
I'm attempting to just use a single value panel.

Thanks in advance.

Tags (2)
1 Solution

somesoni2
Revered Legend

Try this

host ="10.0.33.210" | chart first(_time) as Time | convert ctime(Time)

Other options

host ="10.0.33.210" | chart first(_time) as Time | eval Time=strftime(Time,"%Y/%m/%d %H:%M:%S")

host ="10.0.33.210" | chart first(_time) as Time | eval Time=strftime(Time,"%+")

View solution in original post

somesoni2
Revered Legend

Try this

host ="10.0.33.210" | chart first(_time) as Time | convert ctime(Time)

Other options

host ="10.0.33.210" | chart first(_time) as Time | eval Time=strftime(Time,"%Y/%m/%d %H:%M:%S")

host ="10.0.33.210" | chart first(_time) as Time | eval Time=strftime(Time,"%+")

jclehmuth
Path Finder

That worked thanks. I can't believe I couldn't figure that out.

0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

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