<?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 IF statements in load with Weekday in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/IF-statements-in-load-with-Weekday/m-p/305702#M1200783</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had a similar requirement and I resolved it using the IntervalMatch function. Please have a look at this useful function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dinesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Feb 2011 16:07:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-02-14T16:07:04Z</dc:date>
    <item>
      <title>IF statements in load with Weekday</title>
      <link>https://community.qlik.com/t5/QlikView/IF-statements-in-load-with-Weekday/m-p/305701#M1200782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi - thanks in advance for any replies.&lt;/P&gt;&lt;P&gt;I use the following as part of a load script to recognise trading hours&lt;/P&gt;&lt;P&gt;(OOH is out of hours, INH is in hours)&lt;/P&gt;&lt;P&gt;I need the load to populate [DayShift] based on the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INH which is 8am-9pm Mon-Fri and 9am-5pm on Saturday. Any hours outside of this are OOH.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;This is the load code I have tried but it does not load any INH, everything OOH - any ideas?&lt;/P&gt;&lt;P&gt;if(Weekday(DateLeadReceived) = 'Sat' AND time(timestamp(DateLeadReceived, 'YYYY-MM-DD hh:mm:ss.fff')) &amp;gt;= '09:00:00' AND time(timestamp(DateLeadReceived, 'YYYY-MM-DD hh:mm:ss.fff')) &amp;lt;= '17:00:00','INH',&lt;/P&gt;&lt;P&gt;(if((Weekday(DateLeadReceived) &amp;lt;&amp;gt; 'Sun' OR Weekday(DateLeadReceived) &amp;lt;&amp;gt; 'Sat') AND time(timestamp(DateLeadReceived, 'YYYY-MM-DD hh:mm:ss.fff')) &amp;gt;= '08:00:00' AND time(timestamp(DateLeadReceived, 'YYYY-MM-DD hh:mm:ss.fff')) &amp;lt;= '21:00:00','INH','OOH'))) as [DayShift],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Feb 2011 15:57:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-statements-in-load-with-Weekday/m-p/305701#M1200782</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-14T15:57:14Z</dc:date>
    </item>
    <item>
      <title>IF statements in load with Weekday</title>
      <link>https://community.qlik.com/t5/QlikView/IF-statements-in-load-with-Weekday/m-p/305702#M1200783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had a similar requirement and I resolved it using the IntervalMatch function. Please have a look at this useful function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dinesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Feb 2011 16:07:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-statements-in-load-with-Weekday/m-p/305702#M1200783</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-14T16:07:04Z</dc:date>
    </item>
    <item>
      <title>IF statements in load with Weekday</title>
      <link>https://community.qlik.com/t5/QlikView/IF-statements-in-load-with-Weekday/m-p/305703#M1200784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dinesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have had a look at IntervalMatch but can't currently find anything that achieves what I would need&lt;/P&gt;&lt;P&gt;Could you post any code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Feb 2011 16:33:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-statements-in-load-with-Weekday/m-p/305703#M1200784</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-14T16:33:45Z</dc:date>
    </item>
  </channel>
</rss>

