<?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: If statement scripting help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-statement-scripting-help/m-p/1646080#M731439</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Has, did Vegar's final post get you what you needed?&amp;nbsp; If so, please be sure to come back to the post and use the Accept as Solution button on that post to give him credit and let others know did what you needed.&amp;nbsp; If you are still working on things, please leave an update.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards,&lt;BR /&gt;Brett&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Nov 2019 19:58:52 GMT</pubDate>
    <dc:creator>Brett_Bleess</dc:creator>
    <dc:date>2019-11-12T19:58:52Z</dc:date>
    <item>
      <title>If statement scripting help</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-scripting-help/m-p/1644504#M731433</link>
      <description>&lt;P&gt;I have a if statement&lt;/P&gt;&lt;P&gt;if (STATUS = '2', date(Date#(DAT,'YYMMDD')) ,null()) as Status_Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;However, I need to add another date format&amp;nbsp;date(Date#(DAT,'YYYYMMDD')) in the else condition.&lt;/P&gt;&lt;P&gt;Is it possible?&lt;/P&gt;&lt;P&gt;Any help would be appreciative.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-scripting-help/m-p/1644504#M731433</guid>
      <dc:creator>has75042</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: If statement scripting help</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-scripting-help/m-p/1644512#M731434</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 405px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/23160i360B132522EE829A/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Consider this example script:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LOAD 
*,
if (STATUS = '2', date(Date#(DAT,'YYMMDD')) ,date(Date#(DAT,'YYYYMMDD'))) as Status_Date
 inline [
ID, STATUS, DAT, 		AMOUNT
1, 	2, 		160101, 	10
2,	1,		20160101,	11
3,	2, 		191231,		12
4, 	1,		20191231,	14
];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 21:49:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-scripting-help/m-p/1644512#M731434</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-11-07T21:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: If statement scripting help</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-scripting-help/m-p/1644529#M731435</link>
      <description>&lt;P&gt;This is my actual script&lt;/P&gt;&lt;P&gt;if( STATUS = '3', date(Date#(DAT,'YYYYMMDD')) ,&lt;BR /&gt;if (STATUS = '5',date(Date#(DAT,'YYYYMMDD')) ,&lt;BR /&gt;if(STATUS = '2', date(Date#(DAT,'YYMMDD')),&lt;BR /&gt;if(STATUS = '4', date(Date#(DAT,'YYYYMMDD')) ,null())))) as Status_Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to add two&amp;nbsp; difference date format in then condition for status =2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 22:35:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-scripting-help/m-p/1644529#M731435</guid>
      <dc:creator>has75042</dc:creator>
      <dc:date>2019-11-07T22:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: If statement scripting help</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-scripting-help/m-p/1644583#M731436</link>
      <description>I'm sorry, but I don't understand. What's the issue with your if statement? Why does it not suit your needs? Please explain. Maybe you can give us a sample of input data together with a description of the expected output.</description>
      <pubDate>Fri, 08 Nov 2019 05:22:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-scripting-help/m-p/1644583#M731436</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-11-08T05:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: If statement scripting help</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-scripting-help/m-p/1644853#M731437</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for the confusion.&lt;/P&gt;&lt;P&gt;The issue I have is that I have two different date format for status 2&lt;/P&gt;&lt;P&gt;One format is in 'YYMMDD' and another one is in 'YYYYMMDD'. Please see the attached pic&lt;/P&gt;&lt;P&gt;The logic is breaking because then condition for status 2 is only looking for this date format 'YYMMDD'.&amp;nbsp; I want it to look for both format&amp;nbsp; 'YYMMDD and&amp;nbsp;'YYYYMMDD'&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if(STATUS = '2', date(Date#(DAT,'YYMMDD')),&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;Hope this make some more sense.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2019 14:50:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-scripting-help/m-p/1644853#M731437</guid>
      <dc:creator>has75042</dc:creator>
      <dc:date>2019-11-08T14:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: If statement scripting help</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-scripting-help/m-p/1645470#M731438</link>
      <description>&lt;P&gt;Do you really need to look for status 2? What if you do like this instead? First look for YYYYMMDD and if that does not return any value then try to look for YYMMDD.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LOAD 
*,
ALT(date(Date#(DAT,'YYYYMMDD')),date(Date#(DAT,'YYMMDD'))) as Date,
//if (STATUS = '2', date(Date#(DAT,'YYMMDD')) ,date(Date#(DAT,'YYYYMMDD'))) as Status_Date
 inline [
ID, STATUS, DAT, 		AMOUNT
1, 	2, 		160101, 	10
2,	1,		20160101,	11
3,	2, 		191231,		12
4, 	1,		20191231,	14
];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 15:59:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-scripting-help/m-p/1645470#M731438</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-11-11T15:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: If statement scripting help</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-scripting-help/m-p/1646080#M731439</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Has, did Vegar's final post get you what you needed?&amp;nbsp; If so, please be sure to come back to the post and use the Accept as Solution button on that post to give him credit and let others know did what you needed.&amp;nbsp; If you are still working on things, please leave an update.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards,&lt;BR /&gt;Brett&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 19:58:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-scripting-help/m-p/1646080#M731439</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2019-11-12T19:58:52Z</dc:date>
    </item>
  </channel>
</rss>

