Splunk Search

How to convert date to epoch?

Shakira1
Explorer

I have this date string example: Mon, 01 May 2023 00:00:00 GMT

how can I convert it to epoch

 

thanks!

Labels (1)
Tags (2)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

strptime() will convert strings to epoch times

| eval _time=strptime(time,"%a, %d %b %Y %H:%M:%S %Z")

View solution in original post

0 Karma

Shakira1
Explorer

thank you, its working!

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

strptime() will convert strings to epoch times

| eval _time=strptime(time,"%a, %d %b %Y %H:%M:%S %Z")
0 Karma
Get Updates on the Splunk Community!

Enter the Splunk Community Dashboard Challenge for Your Chance to Win!

The Splunk Community Dashboard Challenge is underway! This is your chance to showcase your skills in creating ...

.conf24 | Session Scheduler is Live!!

.conf24 is happening June 11 - 14 in Las Vegas, and we are thrilled to announce that the conference catalog ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...