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!

Database Performance Sidebar Panel Now on APM Database Query Performance & Service ...

We’ve streamlined the troubleshooting experience for database-related service issues by adding a database ...

IM Landing Page Filter - Now Available

We’ve added the capability for you to filter across the summary details on the main Infrastructure Monitoring ...

Dynamic Links from Alerts to IM Navigators - New in Observability Cloud

Splunk continues to improve the troubleshooting experience in Observability Cloud with this latest enhancement ...