<?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 Logic in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/1534771#M746714</link>
    <description>Yes, I do have a day there.&lt;BR /&gt;2004-04-06.</description>
    <pubDate>Thu, 24 Jan 2019 20:13:10 GMT</pubDate>
    <dc:creator>has75042</dc:creator>
    <dc:date>2019-01-24T20:13:10Z</dc:date>
    <item>
      <title>Date Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/1533517#M746708</link>
      <description>&lt;P&gt;HI All,&lt;/P&gt;&lt;P&gt;My source data has STCLDT (store close date) is a 6 digit numeric filed in YYMMDD format, so if a store closed in December in the year 2000, the format would be 00125. Can't use makedate() function and compare dates. I am using a below logic to change into date format.&lt;/P&gt;&lt;P&gt;So if the store close date number is less than 1300, it defaults to 010101, which is a number than can be converted to a date easily.&lt;/P&gt;&lt;P&gt;if(STCLDT &amp;lt; 1300 and STCLDT &amp;lt;&amp;gt; 0, 010101, STCLDT) as Close_Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;Then, the below logic looks to see if there is a close date. if the numeric filed is zero, the store is open&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if(Close_Date = 0, 'N', 'Y') as Str_Closed,&lt;/P&gt;&lt;P&gt;So in source data, if some enters a&amp;nbsp; store closing date for next month.&amp;nbsp; I wanted to make above flag it in a way that the flag should still read as open store until 1 week or few days from the actual closing date.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/1533517#M746708</guid>
      <dc:creator>has75042</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Date Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/1533542#M746709</link>
      <description>how about&lt;BR /&gt;f(Close_Date = 0, 'N',&lt;BR /&gt;if(today()&amp;lt;Date#(Close_Date ,'YYMMDD'),'N','Y') ) as Str_Closed&lt;BR /&gt;basically if close date is greater than today mark flag as 'N'&lt;BR /&gt;hope i understoof correctly</description>
      <pubDate>Tue, 22 Jan 2019 21:18:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/1533542#M746709</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-01-22T21:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: Date Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/1533575#M746710</link>
      <description>&lt;P&gt;"...&lt;SPAN&gt;&amp;nbsp;is a 6 digit &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;numeric&lt;/STRONG&gt; &lt;/FONT&gt;filed in YYMMDD format..."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Does that mean that Jan 5th 2012 will be represented in your STCLDT as 120105?&lt;/P&gt;&lt;P&gt;If yes, Why are you looking for it to be less than 1300? Only a non-closed store (date is null (or 0)) will be less than 1300.&lt;/P&gt;&lt;P&gt;Otherwise, try this&amp;nbsp; if(Close_Date = 0 OR &lt;SPAN&gt;Close_Date&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&amp;gt; Today(),'N','Y')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jan 2019 00:59:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/1533575#M746710</guid>
      <dc:creator>jduenyas</dc:creator>
      <dc:date>2019-01-23T00:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: Date Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/1533576#M746711</link>
      <description>&lt;P&gt;Correction :&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;if(Close_Date = 0 OR&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Close_Date&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt; (Today()+7),'N','Y')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;That will give you a cutoff of a week before the date becomes effective for the store to be noted as closed.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jan 2019 01:09:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/1533576#M746711</guid>
      <dc:creator>jduenyas</dc:creator>
      <dc:date>2019-01-23T01:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: Date Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/1534739#M746712</link>
      <description>&lt;P&gt;Thanks for your reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;if the store closed in April of 2004, since date the is in numeric field (40406), this number is less than today's date numeric field 192401, with this logic it is showing as open store.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 19:22:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/1534739#M746712</guid>
      <dc:creator>has75042</dc:creator>
      <dc:date>2019-01-24T19:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: Date Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/1534742#M746713</link>
      <description>So you dont have a day there. If so You will check the length of the field and make the full date</description>
      <pubDate>Thu, 24 Jan 2019 19:27:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/1534742#M746713</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-01-24T19:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: Date Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/1534771#M746714</link>
      <description>Yes, I do have a day there.&lt;BR /&gt;2004-04-06.</description>
      <pubDate>Thu, 24 Jan 2019 20:13:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/1534771#M746714</guid>
      <dc:creator>has75042</dc:creator>
      <dc:date>2019-01-24T20:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Date Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/1534773#M746715</link>
      <description>Not sure what the problem is then. is the format different?&lt;BR /&gt;you will need to play around with soem if statements and achieve what you need</description>
      <pubDate>Thu, 24 Jan 2019 20:15:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/1534773#M746715</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-01-24T20:15:35Z</dc:date>
    </item>
  </channel>
</rss>

