Splunk Enterprise

time stamp

shreyasamin64
Explorer

Hello, 

need assistance on time format 

input :                                                              output :  %F    (2021-11-23)

23 Nov

11/23/21

11/23/2021

Labels (1)
0 Karma

isoutamo
SplunkTrust
SplunkTrust

Hi

here is list of those abbreviations https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Commontimeformatvariables

You could convert those from string to epoch with strptime and from epoch to string with strftime.

| makeresults 
| eval time1="23 Nov", time2="11/23/21", time3="11/23/2021"
| eval time1s=strftime(strptime(time1,"%d %b"),"%F"),
time2s=strftime(strptime(time2,"%m/%d/%y"),"%F"),
time3s=strftime(strptime(time3,"%m/%d/%Y"),"%F")
| table time1 time1s time2 time2s time3 time3s

r. Ismo 

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...