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!

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!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...