Splunk Enterprise Security

How to Format Dates in Splunk Email Reports for Improved Readability

KingUs80
Loves-to-Learn Lots

I'm trying to resolve an issue where Splunk sends email reports, but the information exported as an attachment uses a "chron number" format for dates instead of a more readable format like "September 30, 2024." Where can I implement a fix for this, and how can I do it?

Labels (1)
Tags (1)
0 Karma

KingUs80
Loves-to-Learn Lots

I finally identified the mistake I was making, and the issue has been resolved. Thank you for your reponse!

0 Karma

KingUs80
Loves-to-Learn Lots

I finally identified the mistake I was making, and the issue has been resolved. Thank you so much for your reponse!

0 Karma

richgalloway
SplunkTrust
SplunkTrust

How did you correct it?  Please share to help others.

---
If this reply helps you, Karma would be appreciated.
0 Karma

marnall
Motivator

This might work:

<yoursearch>
| eval <yourdisplayedtimefield> = strftime(<youroriginaltimefield>, "%B %e, %Y")

And here is a good reference website for picking the string format characters: https://strftime.net/

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Please tell us more.  Are the emailed reports built-in to Splunk or custom (created by your organization)?  If the latter, please share the SPL used to generate the reports so we can suggest changes that will improve the readability.

I take it by "chron number" you're referring to dates in integer ("epoch") format - the number of seconds since 1/1/1970.  If so, the report probably just needs to use the strftime function to change the format into something easier to read.

---
If this reply helps you, Karma would be appreciated.
0 Karma
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.


Introducing Unified TDIR with the New Enterprise Security 8.2

Read the blog
Get Updates on the Splunk Community!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...