Splunk Search

How to pass the Date picker values to the Search string

srikanth1243
New Member

iam preaparing an dash board in which i need to select the from date and to date and pass those values to search string where it will display the results

Tags (1)
0 Karma

ChrisG
Splunk Employee
Splunk Employee

Build your dashboard with a form input. See the Form with time inputs example in the documentation. You can also look at the Dashboard Examples app, which has a lot of great examples you can use as a basis for your own work.

0 Karma

somesoni2
Revered Legend

Are you using Splunk's time range picker as regular date picker? (have two time range picket and selecting a date OR date/time? If that is correct, then you can use the tokens for each time range picker in your search by using any one of $tokenname.earliest$ OR $tokenname.latest$. Which one to use depends on how you're selecting the date.

0 Karma

srikanth1243
New Member

Hi somesoni2 yes i am using the splunk's time range picker,i am selecting the date i ahve used the tokens as same as you mentioned but getting the error as below
command="dbquery", A database error occurred: ORA-01843: not a valid month
can you kindly suggest on it

0 Karma

woodcock
Esteemed Legend

You can do this with the addinfo command:

... | addinfo
0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...