<?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: Century date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Century-date/m-p/1231965#M872584</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may try this way, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=(Year((TODAY()-1))-1900)*10000 + Month((TODAY()-1))*100+ MonthStart(day(Today()))-1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/143536_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Nov 2016 16:21:03 GMT</pubDate>
    <dc:creator>Anil_Babu_Samineni</dc:creator>
    <dc:date>2016-11-10T16:21:03Z</dc:date>
    <item>
      <title>Century date</title>
      <link>https://community.qlik.com/t5/QlikView/Century-date/m-p/1231963#M872582</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;We are having date as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Year((TODAY()-1))-1900)*10000 + Month((TODAY()-1))*100+ day(Today()-1) = 1161109&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here we need the month start like = 1161101&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let met me know how to get this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Century-date/m-p/1231963#M872582</guid>
      <dc:creator>nareshthavidishetty</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Century date</title>
      <link>https://community.qlik.com/t5/QlikView/Century-date/m-p/1231964#M872583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi naresh, so it's only set the first day of the month?, wouldn't be easier to set a fixed day '1'?:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;(Year((TODAY()-1))-1900)*10000 + Month((TODAY()-1))*100+&lt;STRONG&gt; 1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2016 15:37:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Century-date/m-p/1231964#M872583</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-11-10T15:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: Century date</title>
      <link>https://community.qlik.com/t5/QlikView/Century-date/m-p/1231965#M872584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may try this way, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=(Year((TODAY()-1))-1900)*10000 + Month((TODAY()-1))*100+ MonthStart(day(Today()))-1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/143536_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2016 16:21:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Century-date/m-p/1231965#M872584</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2016-11-10T16:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: Century date</title>
      <link>https://community.qlik.com/t5/QlikView/Century-date/m-p/1231966#M872585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry to discourage you guys, but this formula is wrong... Use Ruben's suggestion... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2016 16:23:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Century-date/m-p/1231966#M872585</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2016-11-10T16:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Century date</title>
      <link>https://community.qlik.com/t5/QlikView/Century-date/m-p/1231967#M872586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oleg, Why So it is wrong? Would i expect reason. so that i can gain bit more&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2016 16:27:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Century-date/m-p/1231967#M872586</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2016-11-10T16:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Century date</title>
      <link>https://community.qlik.com/t5/QlikView/Century-date/m-p/1231968#M872587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Although, I agree with Oleg that Ruben's method is probably the best, but you have incorrect order of things. This might make more sense:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=(Year((TODAY()-1))-1900)*10000 + Month((TODAY()-1))*100+ &lt;SPAN style="color: #ff0000;"&gt;Day(MonthStart(Today()))&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you are first calculating MonthStart for today and then finding what day it is. Fortunately, MonthStart is always 1 and hence Ruben's method is more straight forward &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2016 16:32:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Century-date/m-p/1231968#M872587</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-11-10T16:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Century date</title>
      <link>https://community.qlik.com/t5/QlikView/Century-date/m-p/1231969#M872588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, what Sunny said... To be absolutely precise, you should also subtract 1 from Today() as the rest of the formula does, but not from the final result as you suggested:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;=(Year((TODAY()-1))-1900)*10000 + Month((TODAY()-1))*100+ &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;Day(MonthStart(Today()-1))&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2016 18:26:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Century-date/m-p/1231969#M872588</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2016-11-10T18:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: Century date</title>
      <link>https://community.qlik.com/t5/QlikView/Century-date/m-p/1231970#M872589</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;maybe you could create your century date as dual value using your required format, yet still keeping the underlying numerical value to be able to apply date functions to it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="143607" alt="QlikCommunity_Thread_239433_Pic1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/143607_QlikCommunity_Thread_239433_Pic1.JPG" style="max-width: 620px; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="143608" alt="QlikCommunity_Thread_239433_Pic2.JPG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/143608_QlikCommunity_Thread_239433_Pic2.JPG" style="height: 191px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_1478819067644484" jivemacro_uid="_1478819067644484"&gt;
&lt;P&gt;LOAD *,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dual((Div(Year(Date),100)-19)&amp;amp;Date(Date,'YYMMDD'),Date) as CenturyDate,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dual((Div(Year(Date),100)-19)&amp;amp;Date(Date,'YYMM01'),MonthStart(Date)) as CenturyDateMonthStart&lt;SPAN style="font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;LOAD Date(RecNo()+1) as Date&lt;/P&gt;
&lt;P&gt;AutoGenerate Today();&lt;/P&gt;


&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2016 23:06:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Century-date/m-p/1231970#M872589</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2016-11-10T23:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: Century date</title>
      <link>https://community.qlik.com/t5/QlikView/Century-date/m-p/1231971#M872590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yet another option &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=num#(Date(Addmonths(MonthStart(today()),-1900*12),'YYYMMDD'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2016 23:55:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Century-date/m-p/1231971#M872590</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2016-11-10T23:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: Century date</title>
      <link>https://community.qlik.com/t5/QlikView/Century-date/m-p/1231972#M872591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm &lt;EM&gt;very&lt;/EM&gt; happy you've kept the underlying numeric value of CenturyDate the same as a regular date. If it were my application, I'd &lt;EM&gt;also&lt;/EM&gt; want to be able to make it as easy as possible to use date functions on any century date, and get back something in century date format. So to expand on your idea, I'm thinking a formatting variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="font-size: 10pt;"&gt;SET&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;cd&lt;/EM&gt;&lt;/STRONG&gt; = dual(year($1)-1900&amp;amp;date($1,'MMDD'),$1);&lt;BR /&gt; &lt;BR /&gt;table1:&lt;BR /&gt;&lt;STRONG style=": ; color: #0000ff;"&gt;LOAD&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;$(cd(Date))&lt;/EM&gt;&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;CenturyDate&lt;/SPAN&gt;;&lt;BR /&gt;&lt;STRONG style=": ; color: #0000ff;"&gt;LOAD&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff;"&gt;date&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;recno&lt;/SPAN&gt;()+1) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;AUTOGENERATE&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;today&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(); &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then we can $(cd(monthstart(CenturyDate))) for the first of the month, still a date, but in the correct format, and we can do that in a chart or in the script as desired.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2016 00:01:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Century-date/m-p/1231972#M872591</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-11-11T00:01:13Z</dc:date>
    </item>
  </channel>
</rss>

