<?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: Date string - split year and month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-string-split-year-and-month/m-p/522901#M1140779</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;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First Method:&lt;/P&gt;&lt;P&gt;Year(Date(DateField, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;'YYYY-MM' )) as Year&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Month(Date(DateField, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;'YYYY-MM' )) as Month&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second Method:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Left(DateField,4) as Year,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Right(DateField,2) as Month&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Third Method:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Subfield(DateField,'-',-1) as Month,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Subfield(DateField,'-',1) as Year&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;R.Mayil Vahanan&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 14 Sep 2013 20:18:27 GMT</pubDate>
    <dc:creator>MayilVahanan</dc:creator>
    <dc:date>2013-09-14T20:18:27Z</dc:date>
    <item>
      <title>Date string - split year and month</title>
      <link>https://community.qlik.com/t5/QlikView/Date-string-split-year-and-month/m-p/522898#M1140776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have retail data (product registered) where registrations are formatted as 'YYYY-MM' (one date string).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also have additional sales data (product shipped) where the format is seperated - 'YYYY' for Year and 'MM' for months.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When loading fields into my qlikview file, how can I turn my retail data from one string, to seperate out the Year and Month?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Sep 2013 19:18:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-string-split-year-and-month/m-p/522898#M1140776</guid>
      <dc:creator />
      <dc:date>2013-09-14T19:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: Date string - split year and month</title>
      <link>https://community.qlik.com/t5/QlikView/Date-string-split-year-and-month/m-p/522899#M1140777</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;When load the date filed in QVW&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using Date(Date#(Datefield,'YYYY-MM')) as DateField&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then u can use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Year(DateField) As Year,&lt;/P&gt;&lt;P&gt;Month(DateField) As Month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date(DateField,'YYYY') As Year,&lt;/P&gt;&lt;P&gt;Date(DateField,'MM') As Month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Sep 2013 19:29:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-string-split-year-and-month/m-p/522899#M1140777</guid>
      <dc:creator>v_iyyappan</dc:creator>
      <dc:date>2013-09-14T19:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: Date string - split year and month</title>
      <link>https://community.qlik.com/t5/QlikView/Date-string-split-year-and-month/m-p/522900#M1140778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use &lt;/P&gt;&lt;P&gt;Year(FieldName) as Year and Month(FieldName) as Month&lt;/P&gt;&lt;P&gt;or else&lt;/P&gt;&lt;P&gt;Right(FieldName,4) as Year,&lt;/P&gt;&lt;P&gt;Left(FieldName,2) as Month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mukram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Sep 2013 19:35:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-string-split-year-and-month/m-p/522900#M1140778</guid>
      <dc:creator>mdmukramali</dc:creator>
      <dc:date>2013-09-14T19:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: Date string - split year and month</title>
      <link>https://community.qlik.com/t5/QlikView/Date-string-split-year-and-month/m-p/522901#M1140779</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;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First Method:&lt;/P&gt;&lt;P&gt;Year(Date(DateField, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;'YYYY-MM' )) as Year&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Month(Date(DateField, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;'YYYY-MM' )) as Month&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second Method:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Left(DateField,4) as Year,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Right(DateField,2) as Month&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Third Method:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Subfield(DateField,'-',-1) as Month,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Subfield(DateField,'-',1) as Year&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;R.Mayil Vahanan&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Sep 2013 20:18:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-string-split-year-and-month/m-p/522901#M1140779</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2013-09-14T20:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Date string - split year and month</title>
      <link>https://community.qlik.com/t5/QlikView/Date-string-split-year-and-month/m-p/522902#M1140780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you need to make a date field then go with&lt;/P&gt;&lt;P&gt;Year(Date#(FieldName, 'YYYY-MM')) AS Year&lt;/P&gt;&lt;P&gt;Month(Date#(FieldName, 'YYYY-MM')) AS Month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If date field is not needed then you can use subfield&lt;/P&gt;&lt;P&gt;SubField(FieldName, '-', 1) As Year&lt;/P&gt;&lt;P&gt;SubField(FieldName, '-', 2) As Month&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Sep 2013 21:28:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-string-split-year-and-month/m-p/522902#M1140780</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2013-09-14T21:28:32Z</dc:date>
    </item>
  </channel>
</rss>

