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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...