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!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...