<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Time Picker in dbxquery BETWEEN SQL clause in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Time-Picker-in-dbxquery-BETWEEN-SQL-clause/m-p/530866#M36085</link>
    <description>&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;HI Guys - relative newbie, so apologise if this has been answered, I did look around, but couldn't find anything.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;I have&amp;nbsp;built&amp;nbsp;a dashboard, it has a time input that generated values like: &amp;nbsp;earliest =&amp;nbsp;&lt;/FONT&gt;&lt;FONT size="3"&gt;-&lt;STRONG&gt;15m&lt;/STRONG&gt; to latest = &lt;STRONG&gt;now&lt;/STRONG&gt;, how can&amp;nbsp;I turn these into SQL compatible data types so that when&amp;nbsp;I execute:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;| dbxquery query="SELECT * FROM tableName WHERE created BETWEEN $LATEST$ AND $EARLIEST$" connection="dbConnectionName"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where in the illustration above my time picker is:&amp;nbsp;$tok.timeWindow.earliest$ to $tok.timeWindow.latest$&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;So that the earliest and latest values can sit within a between clause.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Wed, 25 Nov 2020 18:00:10 GMT</pubDate>
    <dc:creator>andy_hollywood</dc:creator>
    <dc:date>2020-11-25T18:00:10Z</dc:date>
    <item>
      <title>Time Picker in dbxquery BETWEEN SQL clause</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Time-Picker-in-dbxquery-BETWEEN-SQL-clause/m-p/530866#M36085</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;HI Guys - relative newbie, so apologise if this has been answered, I did look around, but couldn't find anything.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;I have&amp;nbsp;built&amp;nbsp;a dashboard, it has a time input that generated values like: &amp;nbsp;earliest =&amp;nbsp;&lt;/FONT&gt;&lt;FONT size="3"&gt;-&lt;STRONG&gt;15m&lt;/STRONG&gt; to latest = &lt;STRONG&gt;now&lt;/STRONG&gt;, how can&amp;nbsp;I turn these into SQL compatible data types so that when&amp;nbsp;I execute:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;| dbxquery query="SELECT * FROM tableName WHERE created BETWEEN $LATEST$ AND $EARLIEST$" connection="dbConnectionName"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where in the illustration above my time picker is:&amp;nbsp;$tok.timeWindow.earliest$ to $tok.timeWindow.latest$&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;So that the earliest and latest values can sit within a between clause.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 18:00:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Time-Picker-in-dbxquery-BETWEEN-SQL-clause/m-p/530866#M36085</guid>
      <dc:creator>andy_hollywood</dc:creator>
      <dc:date>2020-11-25T18:00:10Z</dc:date>
    </item>
  </channel>
</rss>

