<?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 Date Shift Problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-Shift-Problem/m-p/217960#M71130</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;I have a file which shows holidays for employees. The data field format is as below:&lt;/P&gt;&lt;P&gt;1001M01&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;First two character presents years&lt;/LI&gt;&lt;LI&gt;Second two character presents months&lt;/LI&gt;&lt;LI&gt;Remaining part of the field is not important&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;When the employee has an holiday at December it shows in next month as January in the system. I would like to show it in exact date as December. How can I make this shift.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Apr 2011 11:59:47 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-04-15T11:59:47Z</dc:date>
    <item>
      <title>Date Shift Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Shift-Problem/m-p/217960#M71130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;I have a file which shows holidays for employees. The data field format is as below:&lt;/P&gt;&lt;P&gt;1001M01&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;First two character presents years&lt;/LI&gt;&lt;LI&gt;Second two character presents months&lt;/LI&gt;&lt;LI&gt;Remaining part of the field is not important&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;When the employee has an holiday at December it shows in next month as January in the system. I would like to show it in exact date as December. How can I make this shift.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2011 11:59:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Shift-Problem/m-p/217960#M71130</guid>
      <dc:creator />
      <dc:date>2011-04-15T11:59:47Z</dc:date>
    </item>
    <item>
      <title>Date Shift Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Shift-Problem/m-p/217961#M71131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;First, we need to transform your string into a date.&lt;/P&gt;&lt;P&gt;=makedate(left(string,2)+2000, num(mid(string,3,2)))&lt;/P&gt;&lt;P&gt;Second, we shift this date to the previos month.&lt;/P&gt;&lt;P&gt;= addmonsths( makedate(left(string,2)+2000, num(mid(string,3,2))) , -1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2011 12:26:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Shift-Problem/m-p/217961#M71131</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2011-04-15T12:26:44Z</dc:date>
    </item>
    <item>
      <title>Date Shift Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Shift-Problem/m-p/217962#M71132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erich,&lt;/P&gt;&lt;P&gt;Thanks for you solution. It works for years which are greater than 2000. There are also some information for 1999, 1998, 1997, etc. In above solution those years look like as 2099, 2098, 2097. What do you suggest for this?&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2011 13:15:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Shift-Problem/m-p/217962#M71132</guid>
      <dc:creator />
      <dc:date>2011-04-15T13:15:25Z</dc:date>
    </item>
    <item>
      <title>Date Shift Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Shift-Problem/m-p/217963#M71133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I suppose you would need to set a point at which the birthdays are either in the 1900's or the 2000's. For example, if you say that anyone with a birthday after the year 20 is going to be in the 1900's then:&lt;/P&gt;&lt;P&gt;= if (left(string,2) &amp;lt;= 20, addmonsths( makedate(left(string,2)+2000, num(mid(string,3,2))) , -1),&lt;/P&gt;&lt;P&gt;addmonsths( makedate(left(string,2)+1900, num(mid(string,3,2))) , -1))&lt;/P&gt;&lt;P&gt;I'm sure there's probably a way to make a check on the current year to see if the birth year further forward than the current year, maybe:&lt;/P&gt;&lt;P&gt;= if(left(string,2) &amp;lt;= year(today(0), addmonsths( makedate(left(string,2)+2000, num(mid(string,3,2))) , -1),&lt;/P&gt;&lt;P&gt;addmonsths( makedate(left(string,2)+1900, num(mid(string,3,2))) , -1))&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2011 15:00:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Shift-Problem/m-p/217963#M71133</guid>
      <dc:creator>chris_johnson</dc:creator>
      <dc:date>2011-04-15T15:00:03Z</dc:date>
    </item>
    <item>
      <title>Date Shift Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Shift-Problem/m-p/217964#M71134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I agree with Chris, there must be in some point where you have to say if it's 20th or 21st century.&lt;/P&gt;&lt;P&gt;But for the time being, taking a loot at your data, the following should be enough to transform field CJ into Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=Date(Date#(Left(CJ, 4), 'YYMM'))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Those that start in 99 will be considered as 1999, those that start in 00 or greater will be considered as 2000.&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2011 15:16:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Shift-Problem/m-p/217964#M71134</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-04-15T15:16:47Z</dc:date>
    </item>
  </channel>
</rss>

