<?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 dateformat for peek in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/dateformat-for-peek/m-p/285908#M106347</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can see several potential problems:&lt;BR /&gt;First, I suspect the third parameter of Subfield should be 2 not 3.&lt;BR /&gt;Secondly, the second parameter of the Num function should have single quotes.&lt;BR /&gt;Thirdly, I think you need to use the Min and Max functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this after the concatenation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MinMaxDate:&lt;BR /&gt;Load &lt;BR /&gt; Min(temp_date) as MinDate,&lt;BR /&gt; Max(temp_date) as MaxDate&lt;BR /&gt; resident temp_date;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let StartDate = num(peek('MinDate',-1,'MinMaxDate'));&lt;BR /&gt;Let EndDate = num(peek('MaxDate',-1,'MinMaxDate'));&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jan 2012 15:40:27 GMT</pubDate>
    <dc:creator>hic</dc:creator>
    <dc:date>2012-01-18T15:40:27Z</dc:date>
    <item>
      <title>dateformat for peek</title>
      <link>https://community.qlik.com/t5/QlikView/dateformat-for-peek/m-p/285906#M106345</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'm loading transaction date from a column in table 1 and from filename in table 2.&lt;/P&gt;&lt;P&gt;Then I'm concatenating just that field to create a complete set of dates. From that I pick min and max dates so that I can create a master calendar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I look in the table temp_date all dates are there but EndDate only concider dates in table 1.&lt;/P&gt;&lt;P&gt;File name is blabla_200911.xls, one per month that is. _200912, _201001&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming it's a format issue? Using QV 10 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;table_1:&lt;/P&gt;&lt;P&gt;date(date#(somefield,'YYMMDD'),'YYYY-MM-DD') as TransDatum&lt;/P&gt;&lt;P&gt;table_2:&lt;/P&gt;&lt;P&gt;date(date#(subfield(filebasename(), '_', 3) &amp;amp; num(1, 00),'YYYYMMDD'),'YYYY-MM-DD') as TransDatum,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Create a temp table with all TransDatum&lt;/P&gt;&lt;P&gt;temp_date:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;TransDatum&lt;/P&gt;&lt;P&gt;Resident table_1;&lt;/P&gt;&lt;P&gt;Concatenate(temp_date) load&lt;/P&gt;&lt;P&gt;TransDatum&lt;/P&gt;&lt;P&gt;Resident table_2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;time:&lt;/P&gt;&lt;P&gt;Let StartDate = num(peek('TransDatum',0,'temp_date'));&lt;/P&gt;&lt;P&gt;Let EndDate = num(peek('TransDatum',-1,'temp_date'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2012 13:34:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dateformat-for-peek/m-p/285906#M106345</guid>
      <dc:creator />
      <dc:date>2012-01-18T13:34:43Z</dc:date>
    </item>
    <item>
      <title>dateformat for peek</title>
      <link>https://community.qlik.com/t5/QlikView/dateformat-for-peek/m-p/285907#M106346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;peek is used to find first and last record using 0 and -1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will consider only Transdatum first and last date&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2012 14:24:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dateformat-for-peek/m-p/285907#M106346</guid>
      <dc:creator>SunilChauhan</dc:creator>
      <dc:date>2012-01-18T14:24:52Z</dc:date>
    </item>
    <item>
      <title>dateformat for peek</title>
      <link>https://community.qlik.com/t5/QlikView/dateformat-for-peek/m-p/285908#M106347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can see several potential problems:&lt;BR /&gt;First, I suspect the third parameter of Subfield should be 2 not 3.&lt;BR /&gt;Secondly, the second parameter of the Num function should have single quotes.&lt;BR /&gt;Thirdly, I think you need to use the Min and Max functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this after the concatenation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MinMaxDate:&lt;BR /&gt;Load &lt;BR /&gt; Min(temp_date) as MinDate,&lt;BR /&gt; Max(temp_date) as MaxDate&lt;BR /&gt; resident temp_date;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let StartDate = num(peek('MinDate',-1,'MinMaxDate'));&lt;BR /&gt;Let EndDate = num(peek('MaxDate',-1,'MinMaxDate'));&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2012 15:40:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dateformat-for-peek/m-p/285908#M106347</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2012-01-18T15:40:27Z</dc:date>
    </item>
  </channel>
</rss>

