<?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: Saving the maximum date from script in own variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Saving-the-maximum-date-from-script-in-own-variable/m-p/287525#M106958</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for this hint. I did not know that QV allows to create own variales in the report, and was thinking that all this stuff needs to be created in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because Date2 was appearing as 156 and not 31/12/2010, I corrected it into:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATE2 = Date('31/12/'&amp;amp;Year(DATE1-360))&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #800080; font-size: 8pt;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 8pt;"&gt;Thanks a lot once more&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #800080; font-size: 8pt;"&gt;Robert &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #800080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;SPAN style=": ; color: #800080; font-size: 1;"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Jul 2011 05:50:53 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-07-19T05:50:53Z</dc:date>
    <item>
      <title>Saving the maximum date from script in own variable</title>
      <link>https://community.qlik.com/t5/QlikView/Saving-the-maximum-date-from-script-in-own-variable/m-p/287523#M106956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need some help...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a script loading some data, DATE is one of the fields loaded. Those dates are not sequential, sometimes the difference between 2 dates could be 7 days, sometimes 2 days. I would like to create in this script 2 my own variables:&lt;/P&gt;&lt;P&gt;DATE1 - with the maximum date present in DATE variable&lt;/P&gt;&lt;P&gt;DATE2 - with 31-12-"present year" to the one represented by the maximum date from DATRE (in 100% cases present year to the max date from DATE would be present year to today())&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seams easy, but as I am not so familiar with date fuctions in a script, I just do not know how to handle&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2011 14:16:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Saving-the-maximum-date-from-script-in-own-variable/m-p/287523#M106956</guid>
      <dc:creator />
      <dc:date>2011-07-18T14:16:07Z</dc:date>
    </item>
    <item>
      <title>Re: Saving the maximum date from script in own variable</title>
      <link>https://community.qlik.com/t5/QlikView/Saving-the-maximum-date-from-script-in-own-variable/m-p/287524#M106957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi draszor&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ok, I would create the variables in the qvw itself...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATE1 = Max(DATE)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATE2 then uses the variable DATE1 to ascertain the max year, then uses it as follows:&lt;/P&gt;&lt;P&gt;DATE2 = &lt;SPAN style="font-family: 'Arial','sans-serif'; color: blue; font-size: 9pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: black; font-size: 9pt;"&gt;('31/12/'&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: blue; font-size: 9pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9pt; font-family: 'Arial','sans-serif';"&gt;DATE1&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: black; font-size: 9pt;"&gt;))-&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9pt; font-family: 'Arial','sans-serif';"&gt;DATE1 &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9pt; font-family: 'Arial','sans-serif';"&gt; &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I've attached a simple example to help you...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Derek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2011 15:14:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Saving-the-maximum-date-from-script-in-own-variable/m-p/287524#M106957</guid>
      <dc:creator>derekjones</dc:creator>
      <dc:date>2011-07-18T15:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: Saving the maximum date from script in own variable</title>
      <link>https://community.qlik.com/t5/QlikView/Saving-the-maximum-date-from-script-in-own-variable/m-p/287525#M106958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for this hint. I did not know that QV allows to create own variales in the report, and was thinking that all this stuff needs to be created in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because Date2 was appearing as 156 and not 31/12/2010, I corrected it into:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATE2 = Date('31/12/'&amp;amp;Year(DATE1-360))&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #800080; font-size: 8pt;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 8pt;"&gt;Thanks a lot once more&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #800080; font-size: 8pt;"&gt;Robert &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #800080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;SPAN style=": ; color: #800080; font-size: 1;"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 05:50:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Saving-the-maximum-date-from-script-in-own-variable/m-p/287525#M106958</guid>
      <dc:creator />
      <dc:date>2011-07-19T05:50:53Z</dc:date>
    </item>
  </channel>
</rss>

