Splunk Search

Funny Looking Date

andrewkenth
Communicator

I have a search that ends with ... | bucket span=1d _time | stats count first(_time) as Date by UserName but the date is showing up as '138380400' instead of 11/07/2013. Do I need to run a function on the date field to format it?

Tags (2)
0 Karma
1 Solution

somesoni2
Revered Legend

Yes, the _time value you see is the epoch time so you would have to format the date time using one of the following.

...| convert timeformat="%m/%d/%Y" ctime(_time) AS _time

...|eval _time=strftime(_time,"%m/%d/%Y")

View solution in original post

somesoni2
Revered Legend

Yes, the _time value you see is the epoch time so you would have to format the date time using one of the following.

...| convert timeformat="%m/%d/%Y" ctime(_time) AS _time

...|eval _time=strftime(_time,"%m/%d/%Y")
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 ...