Dashboards & Visualizations

Time Picker in dbxquery BETWEEN SQL clause

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
Don’t Miss Global Splunk
User Groups Week!

Free LIVE events worldwide 2/8-2/12
Connect, learn, and collect rad prizes
and swag!