<?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: A function to check if a field value is correct date? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/A-function-to-check-if-a-field-value-is-correct-date/m-p/533942#M199449</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's work for me&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Sep 2014 18:58:20 GMT</pubDate>
    <dc:creator>mvaugusto</dc:creator>
    <dc:date>2014-09-11T18:58:20Z</dc:date>
    <item>
      <title>A function to check if a field value is correct date?</title>
      <link>https://community.qlik.com/t5/QlikView/A-function-to-check-if-a-field-value-is-correct-date/m-p/533936#M199443</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; I have a string like 20030934 and another like 19871105 and another like 20030229. Obviously only the second is a correct date. Is there a function in qlikview like IsDate(20030934)&amp;nbsp; to check if a value is correct date? What is the best way to do this check?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Iliyan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2013 11:47:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/A-function-to-check-if-a-field-value-is-correct-date/m-p/533936#M199443</guid>
      <dc:creator>iliyansomlev</dc:creator>
      <dc:date>2013-07-29T11:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: A function to check if a field value is correct date?</title>
      <link>https://community.qlik.com/t5/QlikView/A-function-to-check-if-a-field-value-is-correct-date/m-p/533937#M199444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;isnull(date(date#(20030933,'YYYYMMDD'),'YYYY-MM-DD'))&lt;/P&gt;&lt;P&gt;That returns 0 for valid an -1 for invalid dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Florian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2013 11:55:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/A-function-to-check-if-a-field-value-is-correct-date/m-p/533937#M199444</guid>
      <dc:creator>pennetzdorfer</dc:creator>
      <dc:date>2013-07-29T11:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: A function to check if a field value is correct date?</title>
      <link>https://community.qlik.com/t5/QlikView/A-function-to-check-if-a-field-value-is-correct-date/m-p/533938#M199445</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If the data coming from the source is in date format then qlikview will convert in date format and if the format is not recognized qlikview will consider that value as text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; But then you need to write the logic to identify which text should be considered as date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Something like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(num#(Mid(DATA,5,2))&amp;gt;12,'Not a Valid Month',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Num#(right(DATA,2)) &amp;gt; 31, 'Not a Valid Month')) as Flag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hope the logic is clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2013 11:55:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/A-function-to-check-if-a-field-value-is-correct-date/m-p/533938#M199445</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2013-07-29T11:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: A function to check if a field value is correct date?</title>
      <link>https://community.qlik.com/t5/QlikView/A-function-to-check-if-a-field-value-is-correct-date/m-p/533939#M199446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The data from the source is a string within which a date is coded in the first 8 symbols- 2013012312234. So I have to work with strings. I used the logic you mentioned, but the code becomes quite cumbersome because I have three cases in the coding logic of these strings (for dates before 1900, for XX century dates and for dates after 2000).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The idea to use IsNull as check seems short and intuitive, I will try and see how it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your answers.&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Iliyan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2013 12:02:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/A-function-to-check-if-a-field-value-is-correct-date/m-p/533939#M199446</guid>
      <dc:creator>iliyansomlev</dc:creator>
      <dc:date>2013-07-29T12:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: A function to check if a field value is correct date?</title>
      <link>https://community.qlik.com/t5/QlikView/A-function-to-check-if-a-field-value-is-correct-date/m-p/533940#M199447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Iliyan,&lt;/P&gt;&lt;P&gt;please see the attached example for help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rainer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2013 12:02:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/A-function-to-check-if-a-field-value-is-correct-date/m-p/533940#M199447</guid>
      <dc:creator />
      <dc:date>2013-07-29T12:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: A function to check if a field value is correct date?</title>
      <link>https://community.qlik.com/t5/QlikView/A-function-to-check-if-a-field-value-is-correct-date/m-p/533941#M199448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, this gets closest to what I wanted, it's short and fast.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2013 12:12:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/A-function-to-check-if-a-field-value-is-correct-date/m-p/533941#M199448</guid>
      <dc:creator>iliyansomlev</dc:creator>
      <dc:date>2013-07-29T12:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: A function to check if a field value is correct date?</title>
      <link>https://community.qlik.com/t5/QlikView/A-function-to-check-if-a-field-value-is-correct-date/m-p/533942#M199449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's work for me&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Sep 2014 18:58:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/A-function-to-check-if-a-field-value-is-correct-date/m-p/533942#M199449</guid>
      <dc:creator>mvaugusto</dc:creator>
      <dc:date>2014-09-11T18:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: A function to check if a field value is correct date?</title>
      <link>https://community.qlik.com/t5/QlikView/A-function-to-check-if-a-field-value-is-correct-date/m-p/533943#M199450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried this and it looked good but BEWARE QlikView seems to have some serious date related bugs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It allowed me to quite happily validate 29 February 2015 and even 31 February 2015. Only when I tried 32 February it it flag it up as 'Not Valid'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this in a load script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;[Date Check]:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;mydate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; ,&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;ALT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DATE#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;mydate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ,'DD-MMM-YYYY' ),'Not valid' )&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[My Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;INLINE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[mydate&lt;BR /&gt; 28-FEB-2015&lt;BR /&gt; 31-FEB-2015&lt;BR /&gt; 32-FEB-2015&lt;BR /&gt; ]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2015 11:36:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/A-function-to-check-if-a-field-value-is-correct-date/m-p/533943#M199450</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-04T11:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: A function to check if a field value is correct date?</title>
      <link>https://community.qlik.com/t5/QlikView/A-function-to-check-if-a-field-value-is-correct-date/m-p/533944#M199451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And to make things even worse. 31-feb-2015 is shown as 03-mar-2015&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2016 08:24:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/A-function-to-check-if-a-field-value-is-correct-date/m-p/533944#M199451</guid>
      <dc:creator>Faizoel</dc:creator>
      <dc:date>2016-02-02T08:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: A function to check if a field value is correct date?</title>
      <link>https://community.qlik.com/t5/QlikView/A-function-to-check-if-a-field-value-is-correct-date/m-p/533945#M199452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Makedate() function can handle whether or not the proposed date is actually a valid date. If not valid, it returns null. For example like this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; *,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;makedate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;mid&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;possible_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,1,4),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;mid&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;possible_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,5,2),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;mid&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;possible_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,7,2)) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;isDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;inline&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[&lt;BR /&gt; possible_date&lt;BR /&gt; 20150226&lt;BR /&gt; 20150227&lt;BR /&gt; 20150228&lt;BR /&gt; 20150229&lt;BR /&gt; 20150230&lt;BR /&gt; 20150231&lt;BR /&gt; 20150232&lt;BR /&gt; &lt;BR /&gt; 20160226&lt;BR /&gt; 20160227&lt;BR /&gt; 20160228&lt;BR /&gt; 20160229&lt;BR /&gt; 20160230&lt;BR /&gt; 20160231&lt;BR /&gt; 20160232&lt;BR /&gt; ]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;and the result looks like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/147975_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Dec 2016 07:33:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/A-function-to-check-if-a-field-value-is-correct-date/m-p/533945#M199452</guid>
      <dc:creator>eniemenm</dc:creator>
      <dc:date>2016-12-30T07:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: A function to check if a field value is correct date?</title>
      <link>https://community.qlik.com/t5/QlikView/A-function-to-check-if-a-field-value-is-correct-date/m-p/533946#M199453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the previous answers there seems to be problems with varying amount of days per month. Makedate() can handle those.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Dec 2016 07:37:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/A-function-to-check-if-a-field-value-is-correct-date/m-p/533946#M199453</guid>
      <dc:creator>eniemenm</dc:creator>
      <dc:date>2016-12-30T07:37:37Z</dc:date>
    </item>
  </channel>
</rss>

