Dashboards & Visualizations

Get preset values as specific date

karthi25
Path Finder

I have a time dropdown as below:

 <input type="time" token="dashboardTime" searchWhenChanged="true">
        <label>SELECT TIME RANGE</label>
        <default>
          <earliest>-7d@d</earliest>
          <latest>now</latest>
        </default>
      </input>

Now , I need write a query based field which was under the selected time . For Eg: If I choose Last 7 days it should be:

index=**** sourcetype=**** "cf_foundation=px-npe01" "cf_org_name=****" "cf_space_name=****" "cf_app_name=****" "||splunk-logger||" taskName='****' status='COMPLETED' | sort -splunkLogId  | eval startDateModified= strptime( startDate, "%d-%m-%Y") 
 | where startDateModified > "01/02/2018" and starDate <=  "07/02/208"|stats count
0 Karma

cmerriman
Super Champion

it looks like startDateModified is based on startDate, so the values would be the same, but formatted differently? Is there a reason you're using both in the where statement? Are the values different than _time?

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...