<?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: Creating Month-Year Field From Date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Creating-Month-Year-Field-From-Date/m-p/795837#M281148</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the suggestion. After a little more research I've found that the following code does what I like without needing to convert the date to text:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_14262085125994920 jive_macro_code" jivemacro_uid="_14262085125994920"&gt;
&lt;P&gt;date(monthstart(date,), 'MMM-YY'))&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Mar 2015 01:02:09 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-03-13T01:02:09Z</dc:date>
    <item>
      <title>Creating Month-Year Field From Date</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-Month-Year-Field-From-Date/m-p/795835#M281146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm currently trying to convert a date value (eg 01/01/2013, DD/MM/YYYY) to a month-year format - Jan-13. In my script I am using the following line to achieve this:&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14262043194134154" jivemacro_uid="_14262043194134154"&gt;
&lt;P&gt;Date(date,'MMM-YY') AS MonthYear&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I expect to see is a single row for each unique MonthYear value. What I get though is what appears to be a new row for each day of the month for a given MonthYear value: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="monthYear.PNG" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/80614_monthYear.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's as if the field is displaying the date correctly but somewhere in the back end there is extra date data attached to the row. I have other apps that use similar code but don't exhibit this behavior. Any ideas what's going on?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2015 00:00:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-Month-Year-Field-From-Date/m-p/795835#M281146</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-13T00:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Month-Year Field From Date</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-Month-Year-Field-From-Date/m-p/795836#M281147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this:&lt;/P&gt;&lt;P&gt;t1:&lt;/P&gt;&lt;P&gt;load * Inline&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;datek&lt;/P&gt;&lt;P&gt;01/01/2013&lt;/P&gt;&lt;P&gt;02/01/2013&lt;/P&gt;&lt;P&gt;02/02/2013&lt;/P&gt;&lt;P&gt;01/01/2013&lt;/P&gt;&lt;P&gt;01/03/2013&lt;/P&gt;&lt;P&gt;02/03/2013&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t2:&lt;/P&gt;&lt;P&gt;DATE(makedate(right(datek,4),mid(datek,4,2)),'MMM-YY') as MonthYear&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resident t1;&lt;/P&gt;&lt;P&gt;DROP TABLE t1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="80627" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/80627_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2015 00:15:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-Month-Year-Field-From-Date/m-p/795836#M281147</guid>
      <dc:creator>robert_mika</dc:creator>
      <dc:date>2015-03-13T00:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Month-Year Field From Date</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-Month-Year-Field-From-Date/m-p/795837#M281148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the suggestion. After a little more research I've found that the following code does what I like without needing to convert the date to text:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_14262085125994920 jive_macro_code" jivemacro_uid="_14262085125994920"&gt;
&lt;P&gt;date(monthstart(date,), 'MMM-YY'))&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2015 01:02:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-Month-Year-Field-From-Date/m-p/795837#M281148</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-13T01:02:09Z</dc:date>
    </item>
  </channel>
</rss>

