Splunk Search

Convert outputted time (epoch) to readable Date/time

gerald_huddlest
Path Finder

sure this is very similar to other questions but I have not been able to apply any of the suggestions successfully.

Search as follows:
sourcetype="adloader" | stats min(_time) AS earliest max(_time) AS latest by TransactionID | eval duration=latest-earliest | fields - latest

output

TransactionID - earliest - duration

21354ewer12 - 1330088785.771 - 1.954

how can I convert the earliest column to proper date/time format.

Tags (3)

Ayn
Legend

Convert it to some time format you prefer using eval and strftime. "%+" is often a good quick format modifier for getting a readable timestamp.

sourcetype="adloader" | stats min(_time) AS earliest max(_time) AS latest by TransactionID | eval duration=latest-earliest | eval earliest=strftime(earliest,"%+") | table TransactionID earliest duration
Get Updates on the Splunk Community!

Easily Improve Agent Saturation with the Splunk Add-on for OpenTelemetry Collector

Agent Saturation What and Whys In application performance monitoring, saturation is defined as the total load ...

Explore the Latest Educational Offerings from Splunk [January 2025 Updates]

At Splunk Education, we are committed to providing a robust learning experience for all users, regardless of ...

Developer Spotlight with Paul Stout

Welcome to our very first developer spotlight release series where we'll feature some awesome Splunk ...