<?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 Load data depending on date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-data-depending-on-date/m-p/322408#M1180233</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Going back to the out of range datetime value, are you sure the format is DD/MM/YYYY HH:MM:SS and not MM/DD/YYYY HH:MM:SS since you got the error when you used &lt;SPAN style="color: #636363; font-family: Arial; background-color: #eef4f9;"&gt;'21/01/2011 00:00:00'&lt;/SPAN&gt;&amp;nbsp; and not when you used &lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;'01/01/2011 00:00:00'&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Dec 2011 21:24:10 GMT</pubDate>
    <dc:creator>pover</dc:creator>
    <dc:date>2011-12-27T21:24:10Z</dc:date>
    <item>
      <title>Load data depending on date</title>
      <link>https://community.qlik.com/t5/QlikView/Load-data-depending-on-date/m-p/322402#M1180226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hi All,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;I'm new to Qlikview, I've had my training but I have a few more questions. I apologise in advance if this is not the place to be asking questions.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #008000; font-size: 10pt;"&gt;&lt;SPAN style="color: #008000; font-size: 10pt;"&gt;&lt;SPAN style="color: #000000;"&gt;I do not want to load all data, I only want to load data between two different date values.&lt;/SPAN&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;// Import STUDY table&lt;/DIV&gt;&lt;/SPAN&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;STUDY:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 10pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;STUDYID&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;VISITID&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;RISID&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;EXAMTYPEID&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;EXAMID&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,&lt;BR /&gt; 1 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;STUDYCOUNTER&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;STUDYDATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;STATUS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;STUDYUID&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;BODYSITEMODIFIER&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;PRIORITY&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;INTERFACEID&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 10pt;"&gt;SQL&lt;/STRONG&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; SELECT *&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;FROM SolitonServer.dbo.STUDY; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;I'd like to change this statement to be something like 'FROM Soliton Server.dbo.STUDY where STUDYDATE &amp;gt; '12/10/2010 00:00:00' and STUDYDATE &amp;lt; '21/01/2011 00:00:00';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;I get an error when I try to use this statment. The error is below:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;Any help on how to fix this error would be muchly appreciated.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;Dan &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Dec 2011 10:14:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-data-depending-on-date/m-p/322402#M1180226</guid>
      <dc:creator />
      <dc:date>2011-12-23T10:14:37Z</dc:date>
    </item>
    <item>
      <title>Load data depending on date</title>
      <link>https://community.qlik.com/t5/QlikView/Load-data-depending-on-date/m-p/322403#M1180227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you check data type for the field &lt;SPAN style="font-size: 10pt;"&gt;STUDYDATE. Does it is DateTime or Char? What is the formate for this field?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;or you can try &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;where STUDYDATE &amp;gt; '12-10-2010' and STUDYDATE &amp;lt; '21-01-2011'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Sokkorn Cheav&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Dec 2011 10:31:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-data-depending-on-date/m-p/322403#M1180227</guid>
      <dc:creator>Sokkorn</dc:creator>
      <dc:date>2011-12-23T10:31:17Z</dc:date>
    </item>
    <item>
      <title>Load data depending on date</title>
      <link>https://community.qlik.com/t5/QlikView/Load-data-depending-on-date/m-p/322404#M1180228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Sokkorn Cheav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my SQL table the Data Type of the field STUDYDATE is 'datetime'. So the format is DD/MM/YYYY HH:MM:SS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Dec 2011 10:36:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-data-depending-on-date/m-p/322404#M1180228</guid>
      <dc:creator />
      <dc:date>2011-12-23T10:36:51Z</dc:date>
    </item>
    <item>
      <title>Load data depending on date</title>
      <link>https://community.qlik.com/t5/QlikView/Load-data-depending-on-date/m-p/322405#M1180229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've had some success now. Not sure what I was doing wrong but the following line seems to work fine now:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM SolitonServer.dbo.STUDY where STUDYDATE &amp;gt; '12/11/2003 00:00:00' and STUDYDATE &amp;lt; '01/01/2011 00:00:00';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to change these date values to be read from an xml file. I have the following script for a 'dates' table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Start of [daterange.xml] LOAD statements&lt;BR /&gt;dates:&lt;BR /&gt;LOAD startdate&lt;BR /&gt;enddate&lt;BR /&gt;FROM [..\..\daterange.xml] (XmlSimple, Table is [dates]);&lt;BR /&gt;// End of [daterange.xml] LOAD statements&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I thought I would be able to change my statement in the STUDY table to read:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM SolitonServer.dbo.STUDY where STUDYDATE &amp;gt; startdate and STUDY.STUDYDATE &amp;lt; enddate;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I get the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Invalid column name 'enddate'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any Ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Dec 2011 12:48:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-data-depending-on-date/m-p/322405#M1180229</guid>
      <dc:creator />
      <dc:date>2011-12-23T12:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: Load data depending on date</title>
      <link>https://community.qlik.com/t5/QlikView/Load-data-depending-on-date/m-p/322406#M1180230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you forgot comma sign (,)&lt;/P&gt;&lt;P&gt;Look like this:&lt;/P&gt;&lt;P&gt;// Start of [daterange.xml] LOAD statements&lt;/P&gt;&lt;P&gt;dates:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;startdate&lt;STRONG&gt;,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Maybe this point (,)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;enddate&lt;/P&gt;&lt;P&gt;FROM [..\..\daterange.xml] (XmlSimple, Table is [dates]);&lt;/P&gt;&lt;P&gt;// End of [daterange.xml] LOAD statements&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sokkorn Cheav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Dec 2011 00:30:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-data-depending-on-date/m-p/322406#M1180230</guid>
      <dc:creator>Sokkorn</dc:creator>
      <dc:date>2011-12-24T00:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Load data depending on date</title>
      <link>https://community.qlik.com/t5/QlikView/Load-data-depending-on-date/m-p/322407#M1180231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One load statement can't refer to field names in completely different table.&amp;nbsp; So after loading the dates, I believe you need to do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LET vStartDate = peek('startdate');&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LET vEndDate&amp;nbsp;&amp;nbsp; = peek('enddate');&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FROM SolitonServer.dbo.STUDY &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;WHERE STUDYDATE &amp;gt; '$(vStartDate)'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; AND STUDYDATE &amp;lt; '$(vEndDate)';&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;It is possible you will need to fiddle with the variables to get the correct format to match the studydate, but I'm thinking you won't have to as long as your XML source has them looking correct.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Dec 2011 21:06:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-data-depending-on-date/m-p/322407#M1180231</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-12-27T21:06:00Z</dc:date>
    </item>
    <item>
      <title>Load data depending on date</title>
      <link>https://community.qlik.com/t5/QlikView/Load-data-depending-on-date/m-p/322408#M1180233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Going back to the out of range datetime value, are you sure the format is DD/MM/YYYY HH:MM:SS and not MM/DD/YYYY HH:MM:SS since you got the error when you used &lt;SPAN style="color: #636363; font-family: Arial; background-color: #eef4f9;"&gt;'21/01/2011 00:00:00'&lt;/SPAN&gt;&amp;nbsp; and not when you used &lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;'01/01/2011 00:00:00'&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Dec 2011 21:24:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-data-depending-on-date/m-p/322408#M1180233</guid>
      <dc:creator>pover</dc:creator>
      <dc:date>2011-12-27T21:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Load data depending on date</title>
      <link>https://community.qlik.com/t5/QlikView/Load-data-depending-on-date/m-p/322409#M1180236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks John and Karl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John, your solution with setting the dates as variables worked great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Karl, you were right about the date format, I think I was getting confused as the date was being displayed in DD/MM/YYYY in Qlikview but I assume that Qlikview was changing the format for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem Solved, thanks again!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2011 09:05:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-data-depending-on-date/m-p/322409#M1180236</guid>
      <dc:creator />
      <dc:date>2011-12-28T09:05:49Z</dc:date>
    </item>
  </channel>
</rss>

