Splunk Search

Time picker : can we convert presets, relative time into date range ?

henriq_c
Explorer

Hello,

I am doing:

 case(strptime($latest$,"%Y/%m/%d %H:%M:%S")-strptime($earliest$,"%Y/%m/%d %H:%M:%S")<518400,"1m",true(),"1d")

but it works just for date range and not for other types...

How can I do if I want it to work with presets time, for example, or other types?

Thank you!

0 Karma

niketn
Legend

@henriq_c you would need to run an independent search based on the time picker input and set the required tokens in the independent search refer to one of previous answers on similar lines: https://answers.splunk.com/answers/578984/running-one-of-two-searches-based-on-time-picker-s.html

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Index This | Forward, I’m heavy; backward, I’m not. What am I?

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

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...