Splunk Search

Convert Snap-To Time to Epoch Time

Path Finder

Hi everyone!

My time picker token spits out values like "-60m@m" and I want to convert this time value into an epoch time so I can filter based on epoch time. How do I convert this? Can I use strptime() to do it? What format would I tell strptime() the time is in?

Thank you!

Labels (1)
Tags (3)
1 Solution

| eval epochtime=relative_time(now(),"-60m@m")

View solution in original post

| eval epochtime=relative_time(now(),"-60m@m")

Ultra Champion

your search
| addinfo
| eval your_time=strftime(info_min_time,"%F %T")

try addinfo command. info_min_time is epoch.

Get Updates on the Splunk Community!

Improve Your Security Posture

Watch NowImprove Your Security PostureCustomers are at the center of everything we do at Splunk and security ...

Maximize the Value from Microsoft Defender with Splunk

 Watch NowJoin Splunk and Sens Consulting for this Security Edition Tech TalkWho should attend:  Security ...

This Week's Community Digest - Splunk Community Happenings [6.27.22]

Get the latest news and updates from the Splunk Community here! News From Splunk Answers ✍️ Splunk Answers is ...