<?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: Loading a field with YYYY/MM as a date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Loading-a-field-with-YYYY-MM-as-a-date/m-p/1563540#M742348</link>
    <description>Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/64268"&gt;@Jdance&lt;/a&gt; and welcome into the QlikView community.&lt;BR /&gt;&lt;BR /&gt;Try the logic below. Date#() forces window to evaluate the field as a date with given format.&lt;BR /&gt;&lt;BR /&gt;Load&lt;BR /&gt;*,&lt;BR /&gt;If(date1 &amp;gt; date2 , 'Y') as Flag&lt;BR /&gt;;&lt;BR /&gt;Load&lt;BR /&gt;Date#(date1,'YYYY/MM' ) AS date1,&lt;BR /&gt;Date#(date2 ,'DD/MM/YYYY' ) AS date2&lt;BR /&gt;FROM ...&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 01 Apr 2019 15:16:07 GMT</pubDate>
    <dc:creator>Vegar</dc:creator>
    <dc:date>2019-04-01T15:16:07Z</dc:date>
    <item>
      <title>Loading a field with YYYY/MM as a date</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-a-field-with-YYYY-MM-as-a-date/m-p/1563532#M742347</link>
      <description>&lt;P&gt;Hi, I am very new to Qlikview and I cannot find the answer to this question.&lt;/P&gt;&lt;P&gt;I have a dataset&amp;nbsp;I load which contains a field 'date1' which is in the format YYYY/MM (notice there is no day value) and I also have another field 'date2' with format DD/MM/YYYY. Both variables are recordings of dates but the first one does not include the day value.&lt;/P&gt;&lt;P&gt;My aim is to use a flag variable which marks 'Y' for every case where date1 &amp;gt; date 2 (date1 is later than date2).&amp;nbsp; date2 loads as a date so there is no problem there. The problem is that the original field 'date1' does not load as a date value, thus I cannot compare the 2 values. How can I import a field in this form and still use it as a date?&lt;/P&gt;&lt;P&gt;Thanks for reading and looking forward to your suggestions &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Example of the fields:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;date1&lt;/TD&gt;&lt;TD&gt;date2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2018/12&lt;/TD&gt;&lt;TD&gt;26/04/2018&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2018/08&lt;/TD&gt;&lt;TD&gt;26/04/2018&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2018/12&lt;/TD&gt;&lt;TD&gt;13/12/2018&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2018/10&lt;/TD&gt;&lt;TD&gt;13/12/2018&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Sat, 16 Nov 2024 21:08:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-a-field-with-YYYY-MM-as-a-date/m-p/1563532#M742347</guid>
      <dc:creator>Jdance</dc:creator>
      <dc:date>2024-11-16T21:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: Loading a field with YYYY/MM as a date</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-a-field-with-YYYY-MM-as-a-date/m-p/1563540#M742348</link>
      <description>Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/64268"&gt;@Jdance&lt;/a&gt; and welcome into the QlikView community.&lt;BR /&gt;&lt;BR /&gt;Try the logic below. Date#() forces window to evaluate the field as a date with given format.&lt;BR /&gt;&lt;BR /&gt;Load&lt;BR /&gt;*,&lt;BR /&gt;If(date1 &amp;gt; date2 , 'Y') as Flag&lt;BR /&gt;;&lt;BR /&gt;Load&lt;BR /&gt;Date#(date1,'YYYY/MM' ) AS date1,&lt;BR /&gt;Date#(date2 ,'DD/MM/YYYY' ) AS date2&lt;BR /&gt;FROM ...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 01 Apr 2019 15:16:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-a-field-with-YYYY-MM-as-a-date/m-p/1563540#M742348</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-04-01T15:16:07Z</dc:date>
    </item>
    <item>
      <title>Re: Loading a field with YYYY/MM as a date</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-a-field-with-YYYY-MM-as-a-date/m-p/1563547#M742349</link>
      <description>&lt;P&gt;Hahahaha I was doing the same as you I just forgot to include the ' ' around the YYYY/MM.&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 15:43:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-a-field-with-YYYY-MM-as-a-date/m-p/1563547#M742349</guid>
      <dc:creator>Jdance</dc:creator>
      <dc:date>2019-04-01T15:43:20Z</dc:date>
    </item>
  </channel>
</rss>

