Dashboards & Visualizations

Time Picker in dbxquery BETWEEN SQL clause

andy_hollywood
Loves-to-Learn Lots

 

HI Guys - relative newbie, so apologise if this has been answered, I did look around, but couldn't find anything. 

I have built a dashboard, it has a time input that generated values like:  earliest = -15m to latest = now, how can I turn these into SQL compatible data types so that when I execute:

 

 

 

| dbxquery query="SELECT * FROM tableName WHERE created BETWEEN $LATEST$ AND $EARLIEST$" connection="dbConnectionName"

 

Where in the illustration above my time picker is: $tok.timeWindow.earliest$ to $tok.timeWindow.latest$

 

 So that the earliest and latest values can sit within a between clause.

 

Thanks.

Labels (2)
Tags (2)
0 Karma
Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...