<?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 Cecking date in Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Cecking-date-in-Script/m-p/134640#M755519</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two fields CreateDate and BusBreachDate in one table.&lt;/P&gt;&lt;P&gt;And I have another holiday table, where all holidaydate of a year is listed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to write a code like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(CreateDate or BusBreachDate in (holidaydate), nextday morning 10 AM of BusBreachDate, else &lt;STRONG&gt; &lt;/STRONG&gt;BusBreachDate)&amp;nbsp; as BusBreachDate_New&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Example,&lt;/P&gt;&lt;P&gt;For a record, &lt;/P&gt;&lt;P&gt;CreateDate = 04-07-2018&amp;nbsp; 13:37:39&lt;/P&gt;&lt;P&gt;BusBreachDate = 05-07-2018&amp;nbsp; 04:20:27&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Holidaydate =&amp;nbsp; 04-07-2018&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As one of the date (CreateDate&amp;nbsp; OR BusBreachDate)&amp;nbsp; falls under Holiday,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output will be = 06-07-2018&amp;nbsp; 10:00:00 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone please help me to implement this in qlik.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sarif&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>mhmmd_srf</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Cecking date in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Cecking-date-in-Script/m-p/134640#M755519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two fields CreateDate and BusBreachDate in one table.&lt;/P&gt;&lt;P&gt;And I have another holiday table, where all holidaydate of a year is listed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to write a code like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(CreateDate or BusBreachDate in (holidaydate), nextday morning 10 AM of BusBreachDate, else &lt;STRONG&gt; &lt;/STRONG&gt;BusBreachDate)&amp;nbsp; as BusBreachDate_New&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Example,&lt;/P&gt;&lt;P&gt;For a record, &lt;/P&gt;&lt;P&gt;CreateDate = 04-07-2018&amp;nbsp; 13:37:39&lt;/P&gt;&lt;P&gt;BusBreachDate = 05-07-2018&amp;nbsp; 04:20:27&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Holidaydate =&amp;nbsp; 04-07-2018&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As one of the date (CreateDate&amp;nbsp; OR BusBreachDate)&amp;nbsp; falls under Holiday,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output will be = 06-07-2018&amp;nbsp; 10:00:00 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone please help me to implement this in qlik.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sarif&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cecking-date-in-Script/m-p/134640#M755519</guid>
      <dc:creator>mhmmd_srf</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Cecking date in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Cecking-date-in-Script/m-p/134641#M755521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mohamad:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can create flags to evaluate if one register is in holiday, for example using a Applymap function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Juan P Barroso&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2018 09:34:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cecking-date-in-Script/m-p/134641#M755521</guid>
      <dc:creator>jubarrosor</dc:creator>
      <dc:date>2018-10-04T09:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: Cecking date in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Cecking-date-in-Script/m-p/134642#M755522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mohanmad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can create a variable containing the holidays (use chr(39) and ',' to separate the days). Then use the Match() function. Try something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(Match(CreateDate,$(vHoliday)) &lt;SPAN style="font-size: 10pt;"&gt;or &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Match(&lt;SPAN style="font-size: 13.3333px;"&gt;BusBreachDate&lt;/SPAN&gt;,$(vHoliday))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;,Timestamp#(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;BusBreachDate+1&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;amp;' 10:00','DDMMYYYY hh:mm')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;,&lt;SPAN style="font-size: 13.3333px;"&gt;BusBreachDate&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;) as &lt;SPAN style="font-size: 13.3333px;"&gt;BusBreachDate_New&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Greetings, Janneke&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2018 09:51:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cecking-date-in-Script/m-p/134642#M755522</guid>
      <dc:creator>Janneke</dc:creator>
      <dc:date>2018-10-04T09:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: Cecking date in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Cecking-date-in-Script/m-p/134643#M755523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how to create this variable which will hold multiple values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2018 10:10:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cecking-date-in-Script/m-p/134643#M755523</guid>
      <dc:creator>mhmmd_srf</dc:creator>
      <dc:date>2018-10-04T10:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: Cecking date in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Cecking-date-in-Script/m-p/134644#M755524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This solution is tried and tested - please note that I have made assumptions on the date formats being &lt;SPAN style="color: #575757; font-family: arial,helvetica,sans-serif; font-size: 13.33px; font-style: normal; font-weight: 400; text-align: left; text-indent: 0px;"&gt;DD-MM-YYYY, please change to MM&lt;SPAN style="color: #575757; font-family: arial,helvetica,sans-serif; font-size: 13.33px; font-style: normal; font-weight: 400; text-align: left; text-indent: 0px;"&gt;-DD-YYYY where appropriate.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-indent: 0px; text-align: left; color: #575757; font-style: normal; font-size: 13.33px; font-family: arial,helvetica,sans-serif; font-weight: 400;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Please also note that the first two load statements should be changed to load in our source data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;///////////////////////&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//LOAD IN CREATEDATE AND BUSBREACHDATE, CREATE DATE FORMAT TO MATCH HOLIDAYDATE FORMAT&lt;BR /&gt;Dates:&lt;BR /&gt;LOAD&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CreateDate,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; BusBreachDate,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(FLOOR(CreateDate),'DD-MM-YYYY') AS CreateDateFormat,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(FLOOR(BusBreachDate),'DD-MM-YYYY') AS BusBreachDateFormat&lt;BR /&gt;FROM [lib://D (qlik-sense_administrator)\Dates.xlsx]&lt;BR /&gt;(ooxml, no labels, table is Dates);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//LOAD IN HOLIDAYS&lt;BR /&gt;Holidays:&lt;BR /&gt;LOAD&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Holidaydate&lt;BR /&gt;FROM [lib://D (qlik-sense_administrator)\Dates.xlsx]&lt;BR /&gt;(ooxml, no labels, table is Holiday);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//LEFT JOIN 'YES' FLAG WHERE HOLIDAY DATE THE SAME AS BUSBREACHDATE&lt;BR /&gt;Left Join (Dates)&lt;BR /&gt;load&lt;BR /&gt;Holidaydate AS BusBreachDateFormat,&lt;BR /&gt;'YES' AS BusBreachDate_On_Holiday?&lt;BR /&gt;Resident Holidays;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//LEFT JOIN 'YES' FLAG WHERE HOLIDAY DATE THE SAME AS CREATEDATE&lt;BR /&gt;Left Join (Dates)&lt;BR /&gt;load&lt;BR /&gt;Holidaydate AS&amp;nbsp; CreateDateFormat,&lt;BR /&gt;'YES' AS CreateDate_On_Holiday?&lt;BR /&gt;Resident Holidays;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;//CREATE NEW BUSBREACHDATE WHERE FLAG = YES IN EITHER OF ABOVE TWO LEFT JOINS&lt;BR /&gt;Final:&lt;BR /&gt;LOAD &lt;BR /&gt;CreateDate,&lt;BR /&gt;BusBreachDate,&lt;BR /&gt;IF(BusBreachDate_On_Holiday? = 'YES' or CreateDate_On_Holiday? = 'YES',&lt;BR /&gt;TIMESTAMP(BusBreachDateFormat + 1,'DD-MM-YYYY&amp;nbsp; 10:00:00'),BusBreachDate) AS BusBreachDate_New&lt;BR /&gt;Resident Dates;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;DROP Table Dates;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2018 10:53:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cecking-date-in-Script/m-p/134644#M755524</guid>
      <dc:creator>cmorri1988</dc:creator>
      <dc:date>2018-10-04T10:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Cecking date in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Cecking-date-in-Script/m-p/134645#M755525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mohammad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HolidayDate_tmp:&lt;/P&gt;&lt;P&gt;Load Concat(Chr(39)&amp;amp;HolidayDate&amp;amp;Chr(39),',') as &lt;SPAN style="font-size: 13.3333px;"&gt;HolidayDate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;From YOURHOLIDAYDATETABLE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vHoliday=Peek('&lt;SPAN style="font-size: 13.3333px;"&gt;HolidayDate&lt;/SPAN&gt;',0,'&lt;SPAN style="font-size: 13.3333px;"&gt;HolidayDate_tmp&lt;/SPAN&gt;');&amp;nbsp; &lt;/P&gt;&lt;P&gt;Drop Table &lt;SPAN style="font-size: 13.3333px;"&gt;HolidayDate_tmp&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this works. Janneke.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2018 11:57:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cecking-date-in-Script/m-p/134645#M755525</guid>
      <dc:creator>Janneke</dc:creator>
      <dc:date>2018-10-04T11:57:54Z</dc:date>
    </item>
  </channel>
</rss>

