<?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: MM/DD/YYYY date format to 'CYYMMDD' Conversion in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/MM-DD-YYYY-date-format-to-CYYMMDD-Conversion/m-p/1137054#M911069</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 this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_219715_Pic1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/127022_QlikCommunity_Thread_219715_Pic1.JPG" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14652573843396154 jive_text_macro" jivemacro_uid="_14652573843396154"&gt;
&lt;P&gt;SET vDateCentForm = Dual((Year($1)-1900)&amp;amp;Date($1,'MMDD'),$1);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;table1:&lt;/P&gt;
&lt;P&gt;LOAD *,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(vDateCentForm(Date)) as DateCentForm;&lt;/P&gt;
&lt;P&gt;LOAD DayName(Rand()*100000) as Date&lt;/P&gt;
&lt;P&gt;AutoGenerate 20;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;r&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;egards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Jun 2016 23:56:57 GMT</pubDate>
    <dc:creator>MarcoWedel</dc:creator>
    <dc:date>2016-06-06T23:56:57Z</dc:date>
    <item>
      <title>MM/DD/YYYY date format to 'CYYMMDD' Conversion</title>
      <link>https://community.qlik.com/t5/QlikView/MM-DD-YYYY-date-format-to-CYYMMDD-Conversion/m-p/1137052#M911067</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 am having an date variable in the format 'MM/DD/YYYY' and we need to convert this into century format &lt;SPAN style="color: #545454; font-family: arial, sans-serif; font-size: small;"&gt;'CYYMMDD'&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;May we know how to convert the date formats.Below was the variable logic used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vYesterday = (Year((TODAY()-1))-1900)*10000 + Month((TODAY()-1))*100 + day(Today()-1); = 1160605&lt;/P&gt;&lt;P&gt;let vesterdaynormal_date =date(Date#(Right(vYesterday,6),'YYMMDD'),'MM/DD/YYYY');= 06/05/2016&lt;/P&gt;&lt;P&gt;LET vMonthstart =MonthStart( AddMonths((Today()-1),0)); = 06/01/2016&lt;/P&gt;&lt;P&gt; so here we need to convert &lt;SPAN style="font-size: 13.3333px;"&gt;vMonthstart&amp;nbsp; into century format.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So that we can use these variables in the below logic.&lt;/P&gt;&lt;P&gt;LOAD *;&lt;/P&gt;&lt;P&gt;SELECT DISTINCT A7AACD ,&amp;nbsp; count(,A7BANB) as eSign_initiated_MTD&lt;/P&gt;&lt;P&gt;FROM DSA7CPP&lt;/P&gt;&lt;P&gt;WHERE A7AIDT &amp;gt;= $(vMonthstart) AND&amp;nbsp; &amp;lt;= $(vDDD) AND A7BANB = IN (SELECT BPBANB from INBPCPP)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;GROUP BY A7AACD; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May i know the above logic will work in qlikview or else if any modifications required.&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/MM-DD-YYYY-date-format-to-CYYMMDD-Conversion/m-p/1137052#M911067</guid>
      <dc:creator>nareshthavidishetty</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: MM/DD/YYYY date format to 'CYYMMDD' Conversion</title>
      <link>https://community.qlik.com/t5/QlikView/MM-DD-YYYY-date-format-to-CYYMMDD-Conversion/m-p/1137053#M911068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Regarding your monthstart definition, I think this should return the correct format:&lt;BR /&gt;&lt;/SPAN&gt;&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;&lt;BR /&gt;&lt;/SPAN&gt;&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;LET vMonthstart =&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 + 1&lt;/SPAN&gt;;&lt;/SPAN&gt;&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;&lt;BR /&gt;&lt;/SPAN&gt;&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;Regarding you SELECT statement, everything between SELECT and the semicolon will be sent to the SQL driver and executed by this driver. You need to write SQL code that works for your driver, QV will not interprete this code.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2016 22:09:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MM-DD-YYYY-date-format-to-CYYMMDD-Conversion/m-p/1137053#M911068</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-06-06T22:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: MM/DD/YYYY date format to 'CYYMMDD' Conversion</title>
      <link>https://community.qlik.com/t5/QlikView/MM-DD-YYYY-date-format-to-CYYMMDD-Conversion/m-p/1137054#M911069</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 this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_219715_Pic1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/127022_QlikCommunity_Thread_219715_Pic1.JPG" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14652573843396154 jive_text_macro" jivemacro_uid="_14652573843396154"&gt;
&lt;P&gt;SET vDateCentForm = Dual((Year($1)-1900)&amp;amp;Date($1,'MMDD'),$1);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;table1:&lt;/P&gt;
&lt;P&gt;LOAD *,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(vDateCentForm(Date)) as DateCentForm;&lt;/P&gt;
&lt;P&gt;LOAD DayName(Rand()*100000) as Date&lt;/P&gt;
&lt;P&gt;AutoGenerate 20;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;r&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;egards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2016 23:56:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MM-DD-YYYY-date-format-to-CYYMMDD-Conversion/m-p/1137054#M911069</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2016-06-06T23:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: MM/DD/YYYY date format to 'CYYMMDD' Conversion</title>
      <link>https://community.qlik.com/t5/QlikView/MM-DD-YYYY-date-format-to-CYYMMDD-Conversion/m-p/1137055#M911070</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;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;We need convert the below into century format.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;LET vMonthstart =MonthStart( AddMonths((Today()-1),0)); = 06/01/2016 INTO &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: arial, sans-serif; color: #545454;"&gt;'CYYMMDD'.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #545454; font-size: small; font-family: arial, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #545454; font-size: small; font-family: arial, sans-serif;"&gt;Thanks....&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jun 2016 05:08:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MM-DD-YYYY-date-format-to-CYYMMDD-Conversion/m-p/1137055#M911070</guid>
      <dc:creator>nareshthavidishetty</dc:creator>
      <dc:date>2016-06-07T05:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: MM/DD/YYYY date format to 'CYYMMDD' Conversion</title>
      <link>https://community.qlik.com/t5/QlikView/MM-DD-YYYY-date-format-to-CYYMMDD-Conversion/m-p/1137056#M911071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try &lt;A href="https://community.qlik.com/qlik-users/15823"&gt;swuehl&lt;/A&gt;'s suggestion? It looks correct to me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jun 2016 06:20:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MM-DD-YYYY-date-format-to-CYYMMDD-Conversion/m-p/1137056#M911071</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2016-06-07T06:20:26Z</dc:date>
    </item>
  </channel>
</rss>

