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 | I am a number, but when you add ‘G’ to me, I go away. What number am I?

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

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...