<?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 Simple date question in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Simple-date-question/m-p/145032#M23834</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is an example of working autogenerate code used with dates.&lt;/P&gt;&lt;P&gt;sub LoadCalendar&lt;/P&gt;&lt;P&gt;// Calendar Section - Begin&lt;BR /&gt;let StartDate =num(date('2008-01-01', 'MM/DD/YYYY'));&lt;BR /&gt;let EndDate=num(date(today()-1, 'MM/DD/YYYY'));&lt;BR /&gt;&lt;BR /&gt;temp:&lt;BR /&gt;LOAD&lt;BR /&gt;timestamp#(date($(StartDate)+(iterno()-1), 'YYYY-MM-DD') &amp;amp; ' 00:00:00', 'YYYY-MM-DD hh:mm:ss') AS CheckPointStart&lt;BR /&gt;autogenerate 1&lt;BR /&gt;while date($(StartDate)+(iterno()-1))&amp;lt;=date($(EndDate));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Calendar:&lt;BR /&gt;LOAD distinct CheckPointStart,&lt;BR /&gt;date(CheckPointStart, 'MM/DD/YYYY') as DayDate,&lt;BR /&gt;Week(CheckPointStart) as Week,&lt;BR /&gt;Month(CheckPointStart) as Month,&lt;BR /&gt;Year(CheckPointStart) as Year,&lt;BR /&gt;Day(CheckPointStart) as Day&lt;BR /&gt;Resident temp;&lt;/P&gt;&lt;P&gt;DROP TABLE temp;&lt;/P&gt;&lt;P&gt;// Calendar Section - End&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 May 2009 21:29:23 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-05-26T21:29:23Z</dc:date>
    <item>
      <title>Simple date question</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-date-question/m-p/145031#M23833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to create a calender and am hiting trouble right at the offset, was hoping for some help !&lt;/P&gt;&lt;P&gt;I have the following load,&lt;/P&gt;&lt;P&gt;WeekDates:&lt;BR /&gt; LOAD Year,&lt;BR /&gt; Period,&lt;BR /&gt; Week,&lt;BR /&gt; [Start Date],&lt;BR /&gt; [End Date],&lt;BR /&gt; FROM $(cFileName) (qvd);&lt;/P&gt;&lt;P&gt;I would like to create a record for every date between the start and end date in the table, I have tried the autogenerate comand but cant seem to get it to work. I cold change the file that I am reading to have all the information but this seems like something that should be simple to do in QlikView.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2009 21:25:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-date-question/m-p/145031#M23833</guid>
      <dc:creator />
      <dc:date>2009-05-26T21:25:46Z</dc:date>
    </item>
    <item>
      <title>Simple date question</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-date-question/m-p/145032#M23834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is an example of working autogenerate code used with dates.&lt;/P&gt;&lt;P&gt;sub LoadCalendar&lt;/P&gt;&lt;P&gt;// Calendar Section - Begin&lt;BR /&gt;let StartDate =num(date('2008-01-01', 'MM/DD/YYYY'));&lt;BR /&gt;let EndDate=num(date(today()-1, 'MM/DD/YYYY'));&lt;BR /&gt;&lt;BR /&gt;temp:&lt;BR /&gt;LOAD&lt;BR /&gt;timestamp#(date($(StartDate)+(iterno()-1), 'YYYY-MM-DD') &amp;amp; ' 00:00:00', 'YYYY-MM-DD hh:mm:ss') AS CheckPointStart&lt;BR /&gt;autogenerate 1&lt;BR /&gt;while date($(StartDate)+(iterno()-1))&amp;lt;=date($(EndDate));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Calendar:&lt;BR /&gt;LOAD distinct CheckPointStart,&lt;BR /&gt;date(CheckPointStart, 'MM/DD/YYYY') as DayDate,&lt;BR /&gt;Week(CheckPointStart) as Week,&lt;BR /&gt;Month(CheckPointStart) as Month,&lt;BR /&gt;Year(CheckPointStart) as Year,&lt;BR /&gt;Day(CheckPointStart) as Day&lt;BR /&gt;Resident temp;&lt;/P&gt;&lt;P&gt;DROP TABLE temp;&lt;/P&gt;&lt;P&gt;// Calendar Section - End&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2009 21:29:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-date-question/m-p/145032#M23834</guid>
      <dc:creator />
      <dc:date>2009-05-26T21:29:23Z</dc:date>
    </item>
    <item>
      <title>Simple date question</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-date-question/m-p/145033#M23835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin:0cm 0cm 10pt;"&gt;Thanks for your prompt reply,&lt;/P&gt;&lt;P style="margin:0cm 0cm 10pt;text-indent:36pt;"&gt;Unfortunately I don't think I can do as you suggested because out week/year/day numbers don't correspond to the ones used by QlikView (they done offset by exact months). The file I was loading in was outputted directly from out WMS, to make things even more confusing our year start can differ by a few days each year and the number of weeks changes every 4 years ( confusing I know). I was hoping for a simple way to create a record for each day containing date and our week ,year and period.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2009 21:46:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-date-question/m-p/145033#M23835</guid>
      <dc:creator />
      <dc:date>2009-05-26T21:46:27Z</dc:date>
    </item>
    <item>
      <title>Simple date question</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-date-question/m-p/145034#M23836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you talking about a business year instead of calendar year?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2009 21:53:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-date-question/m-p/145034#M23836</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2009-05-26T21:53:34Z</dc:date>
    </item>
    <item>
      <title>Simple date question</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-date-question/m-p/145035#M23837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, we hold the information as is shown in the load command and I was trying to be able to select date/week or year for reporting in QlikView. Like I said I could change the export to output a record for each day but thought it would be a simple exercise to do this in QlikView.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2009 22:02:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-date-question/m-p/145035#M23837</guid>
      <dc:creator />
      <dc:date>2009-05-26T22:02:32Z</dc:date>
    </item>
    <item>
      <title>Simple date question</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-date-question/m-p/145036#M23838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then use a calendar with all business days as second table and join with it.&lt;/P&gt;&lt;P&gt;Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2009 22:11:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-date-question/m-p/145036#M23838</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2009-05-26T22:11:12Z</dc:date>
    </item>
    <item>
      <title>Simple date question</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-date-question/m-p/145037#M23839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ralf,&lt;/P&gt;&lt;P&gt;Sorry Ralf am new to this and dont fully understand what you are saying.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2009 22:23:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-date-question/m-p/145037#M23839</guid>
      <dc:creator />
      <dc:date>2009-05-26T22:23:29Z</dc:date>
    </item>
    <item>
      <title>Simple date question</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-date-question/m-p/145038#M23840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. create a Calendar like this from Eugene: sub LoadCalendar&lt;/P&gt;&lt;P&gt;2. the join:&lt;/P&gt;&lt;P&gt;WeekDates:&lt;BR /&gt; LOAD Year,&lt;BR /&gt; Period,&lt;BR /&gt; Week,&lt;BR /&gt; [Start Date],&lt;BR /&gt; [End Date],&lt;BR /&gt; FROM $(cFileName) (qvd);&lt;/P&gt;&lt;P&gt;JOIN (WeekDays)&lt;BR /&gt;LOAD Week, DayDate RESIDENT Calendar;&lt;/P&gt;&lt;P&gt;The join would go on column Week (same col name).&lt;/P&gt;&lt;P&gt;Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2009 22:46:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-date-question/m-p/145038#M23840</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2009-05-26T22:46:12Z</dc:date>
    </item>
  </channel>
</rss>

