<?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 Re: Date Piker and SQL query in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Date-Piker-and-SQL-query/m-p/1940133#M77492</link>
    <description>&lt;P&gt;You might want to use ODAG&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=Ft3I00-g4H4" target="_blank"&gt;https://www.youtube.com/watch?v=Ft3I00-g4H4&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Jun 2022 06:45:20 GMT</pubDate>
    <dc:creator>vinieme12</dc:creator>
    <dc:date>2022-06-07T06:45:20Z</dc:date>
    <item>
      <title>Date Piker and SQL query</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Piker-and-SQL-query/m-p/1939313#M77431</link>
      <description>&lt;P&gt;How can I get the value of the selected date in Date Piker and then insert it in the SQL query to pass it as a procedure parameter?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2022 07:47:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Piker-and-SQL-query/m-p/1939313#M77431</guid>
      <dc:creator>OlegTom</dc:creator>
      <dc:date>2022-06-03T07:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: Date Piker and SQL query</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Piker-and-SQL-query/m-p/1939482#M77446</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not 100% sure what is your exact use case scenario, however based on the information that you shared I believe that this use case scenario is &lt;SPAN style="color:hsl(0, 75%, 60%);"&gt;&lt;STRONG&gt;not &lt;/STRONG&gt;&lt;/SPAN&gt;possible.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Allow me to elaborate in detail to my hypothesis:&lt;/P&gt;
&lt;OL&gt;
 &lt;LI&gt;&lt;STRONG&gt;SQL statemen&lt;/STRONG&gt; is used in&lt;SPAN style="color:hsl(210, 75%, 60%);"&gt;&lt;STRONG&gt; Data load editor&lt;/STRONG&gt;&lt;/SPAN&gt; (which is found in the &lt;SPAN style="color:hsl(270, 75%, 60%);"&gt;&lt;STRONG&gt;Prepare section&lt;/STRONG&gt;&lt;/SPAN&gt;) to load data from data sources, while &lt;SPAN style="color:hsl(210, 75%, 60%);"&gt;&lt;STRONG&gt;Date Picker&lt;/STRONG&gt;&lt;/SPAN&gt; is an object found in the&lt;SPAN style="color:hsl(270, 75%, 60%);"&gt;&lt;STRONG&gt; Analyze section&lt;/STRONG&gt;&lt;/SPAN&gt;, where the data is already loaded.&amp;nbsp;&lt;/LI&gt;
 &lt;LI&gt;&lt;SPAN style="color:hsl(270, 75%, 60%);"&gt;&lt;STRONG&gt;Prepare section&lt;/STRONG&gt;&lt;/SPAN&gt; and &lt;SPAN style="color:hsl(270, 75%, 60%);"&gt;&lt;STRONG&gt;Analyze section&lt;/STRONG&gt;&lt;/SPAN&gt; are not linked directly. The first one is responsible for &lt;SPAN style="color:hsl(30, 75%, 60%);"&gt;&lt;STRONG&gt;loading &lt;/STRONG&gt;&lt;/SPAN&gt;the data and &lt;SPAN style="color:hsl(30, 75%, 60%);"&gt;&lt;STRONG&gt;preparing &lt;/STRONG&gt;&lt;/SPAN&gt;it, while the second one is used to &lt;SPAN style="color:hsl(120, 75%, 60%);"&gt;&lt;STRONG&gt;analyze &lt;/STRONG&gt;&lt;/SPAN&gt;and &lt;SPAN style="color:hsl(120, 75%, 60%);"&gt;&lt;STRONG&gt;present &lt;/STRONG&gt;&lt;/SPAN&gt;it&lt;/LI&gt;
 &lt;LI&gt;&lt;SPAN style="color:hsl(210, 75%, 60%);"&gt;&lt;STRONG&gt;Date Picker&lt;/STRONG&gt;&lt;/SPAN&gt; object is associated with a filed. So if you want to get the selected value, you can use the function "&lt;SPAN style="color:hsl(210, 75%, 60%);"&gt;&lt;STRONG&gt;GetFieldSelections&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color:hsl(30, 75%, 60%);"&gt;&lt;STRONG&gt;Date_Field&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;", and it will show you the selected values that you picked in Date Picker such as&lt;SPAN style="color:hsl(120, 75%, 60%);"&gt;&lt;STRONG&gt; "1/1/2022, 1/2/2022"&lt;/STRONG&gt;&lt;/SPAN&gt; etc. However this function is not going to work in &lt;SPAN style="color:hsl(210, 75%, 60%);"&gt;&lt;STRONG&gt;Data load editor &lt;/STRONG&gt;&lt;/SPAN&gt;so you could use the values in the &lt;STRONG&gt;SQL script&lt;/STRONG&gt;.&lt;/LI&gt;
 &lt;LI&gt;You can also confirm this by taking a look in the official documentation [1], where it is stated that this function is a&lt;SPAN style="color:hsl(120, 75%, 60%);"&gt;&lt;STRONG&gt; chart function&lt;/STRONG&gt;&lt;/SPAN&gt; and not a &lt;SPAN style="color:hsl(0, 75%, 60%);"&gt;&lt;STRONG&gt;script function&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color:hsl(0, 0%, 60%);"&gt;&lt;I&gt;&lt;STRONG&gt;I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, addressed your concerns or at least pointed you in the right direction, please mark it as Accepted Solution to give further visibility to other community members.&amp;nbsp;&lt;/STRONG&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;---&lt;/P&gt;
&lt;P&gt;[1] &lt;A href="https://help.qlik.com/en-US/sense/May2022/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/getfieldselections.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense/May2022/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/getfieldselections.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2022 14:16:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Piker-and-SQL-query/m-p/1939482#M77446</guid>
      <dc:creator>Andrei_Cusnir</dc:creator>
      <dc:date>2022-06-03T14:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: Date Piker and SQL query</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Piker-and-SQL-query/m-p/1939640#M77455</link>
      <description>&lt;P&gt;I created two variables in the worksheet, and got the start and end dates from the Data Picker, but how do I get these dates in the script?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="OlegTom_0-1654297138988.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/81017iED01E36A0D9484EB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="OlegTom_0-1654297138988.png" alt="OlegTom_0-1654297138988.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;My Script in bottom:&lt;/P&gt;
&lt;P&gt;SET vQVDPath = 'D:/QlikSense';&lt;/P&gt;
&lt;P&gt;LET sLocalTimeZone = TimeZone();&lt;BR /&gt;LET sStartDate = Date(Min([%Master Calendar Date])); //'Kyiv'&lt;BR /&gt;LET sEndDate = Date(Max([%Master Calendar Date]));&lt;/P&gt;
&lt;P&gt;LET Str = 'EXEC dbIdc.dbo.sp_EmsGetMVAData ''2022-05-24 00:00:00'', ''2022-05-25 23:59:59'', ''CNT_003-FT01'''; &lt;BR /&gt;// 'EXEC dbIdc.dbo.sp_EmsGetMVADatav '''&amp;amp; [sStartDate] &amp;amp;''', '''&amp;amp; [sEndDate] &amp;amp;''','&amp;amp;'''CNT_003-FT01''';&lt;/P&gt;
&lt;P&gt;LIB CONNECT TO 'PLANTIT';&lt;/P&gt;
&lt;P&gt;MVA:&lt;BR /&gt;LOAD *;&lt;BR /&gt;SQL $(Str); &lt;BR /&gt;STORE * FROM MVA INTO 'lib://QVD/MVA.qvd';&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2022 23:01:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Piker-and-SQL-query/m-p/1939640#M77455</guid>
      <dc:creator>OlegTom</dc:creator>
      <dc:date>2022-06-03T23:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: Date Piker and SQL query</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Piker-and-SQL-query/m-p/1940133#M77492</link>
      <description>&lt;P&gt;You might want to use ODAG&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=Ft3I00-g4H4" target="_blank"&gt;https://www.youtube.com/watch?v=Ft3I00-g4H4&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 06:45:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Piker-and-SQL-query/m-p/1940133#M77492</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2022-06-07T06:45:20Z</dc:date>
    </item>
  </channel>
</rss>

