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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...