<?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: Separating Date Field by Staggered Shift Schedule in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245815#M1179038</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I still get the same "Expression failed to load. Reload old data?" error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET ThousandSep=',';&lt;BR /&gt;SET DecimalSep='.';&lt;BR /&gt;SET MoneyThousandSep=',';&lt;BR /&gt;SET MoneyDecimalSep='.';&lt;BR /&gt;SET MoneyFormat='$#,##0.00;($#,##0.00)';&lt;BR /&gt;SET TimeFormat='h:mm:ss TT';&lt;BR /&gt;SET DateFormat='M/D/YYYY';&lt;BR /&gt;SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';&lt;BR /&gt;SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';&lt;BR /&gt;SET DayNames='Sun;Mon;Tue;Wed;Thu;Fri;Sat';&lt;BR /&gt;4:07 PM 2/12/2012&lt;BR /&gt;//connect statement&lt;BR /&gt;OLEDB CONNECT TO [Provider=SQLOLEDB.1;Persist Security Info=True;User ID=userID;Initial Catalog=request_report;Data Source=fc8sqlpcl;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=LFCNOTD1032MNC;Use Encryption for Data=False;Tag with column collation when possible=False] (XPassword is MCMePZVMBDZMWQNOULRB);&lt;/P&gt;&lt;P&gt;//Loading only FSRs, RTEs and UARs; filtering out Cancelled, Draft, Closed - No CR Required and Not Feasible.&lt;BR /&gt;Input:&lt;BR /&gt;SQL SELECT *&lt;BR /&gt;FROM "Request_report".dbo."V_MSR" &lt;BR /&gt;where&lt;BR /&gt;(app_id=3 or app_id=22 or app_id=63)&lt;BR /&gt;and&lt;BR /&gt;(status_id != 0 and status_id != 11)&lt;BR /&gt;and&lt;BR /&gt;(status_name != 'Not Feasible' and status_name != 'Closed - No CR Required');&lt;BR /&gt; &lt;BR /&gt;AppNameTable:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; app_id, app_name&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3, FSR&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 22, RTE&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 63, UAR&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Let vShiftCalendarStart = '2/20/2011';&lt;BR /&gt; &lt;BR /&gt;RESULT:&lt;BR /&gt;LOAD *, &lt;BR /&gt;if(ShiftA,'ShiftA ','')&amp;amp;if(ShiftB,'ShiftB ','')&amp;amp;if(ShiftC,'ShiftC ','')&amp;amp;if(ShiftD,'ShiftD','') as WhichShifts;&lt;BR /&gt;LOAD&amp;nbsp; &lt;BR /&gt;update_date, &lt;BR /&gt;app_id, &lt;BR /&gt;status_id, &lt;BR /&gt;status_name,&lt;BR /&gt;if(match(Mod(DayStart(update_date,)-$(#vCalendarStart),14),'0','1','2','7','8','9','10') &lt;BR /&gt;and (frac(update_date) &amp;lt;= maketime(18,30)) and (frac(update_date) &amp;gt;= maketime(6)) ,1,0) as ShiftA, //3-4-4-3 daytime schedule&lt;BR /&gt;if(match(Mod(daystart(DayStart(update_date,0,maketime(18)))-$(#vCalendarStart),14),'0','1','2','6','7','8','9') &lt;BR /&gt;and ((frac(update_date) &amp;lt;= maketime(6,30))&amp;nbsp; or (frac(update_date) &amp;gt;= maketime(18))),1,0) as ShiftB, //3-3-4-4 nighttime schedule&lt;BR /&gt;if(match(Mod(DayStart(update_date,)-$(#vCalendarStart),14),'3','4','5','6','11','12','13') &lt;BR /&gt;and (frac(update_date) &amp;lt;= maketime(18,30)) and (frac(update_date) &amp;gt;= maketime(6)) ,1,0) as ShiftC, //4-4-3-3 daytime shedule&lt;BR /&gt;if(match(Mod(daystart(DayStart(update_date,0,maketime(18)))-$(#vCalendarStart),14),'3','4','5','10','11','12','13') &lt;BR /&gt;and ((frac(update_date) &amp;lt;= maketime(6,30)) or (frac(update_date) &amp;gt;= maketime(18))),1,0) as ShiftD&amp;nbsp; //3-4-4-3 nighttime schedule&lt;BR /&gt;Resident Input;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I still missing something?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Feb 2012 21:08:23 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-02-12T21:08:23Z</dc:date>
    <item>
      <title>Separating Date Field by Staggered Shift Schedule</title>
      <link>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245802#M1179025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the database I'm working on, I have a date field (update_date) in default date format (M/D/YYYY H:MM:SS etc) and I've been tasked with aligning it with a staggered, compressed 4 shift schedule:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="GFScreenshot01 Feb. 01 04.32 PM dnelson.jpg" class="jive-image-thumbnail jive-image" height="185" onclick="" src="https://community.qlik.com/legacyfs/online/10883_GFScreenshot01+Feb.+01+04.32+PM+dnelson.jpg" width="656" /&gt;&lt;/P&gt;&lt;P&gt;Each color is a different shift (A, B, C, D). Due to the 3-4-3-4 pattern, I thought it would be easier just to use Excel to quickly generate a table of all the dates each shift worked from 2011-2025. So I have all that data, but am stumped as to how to proceed from here. I've tried the following inline tables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; update_date, ShiftADates&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2/20/2011, Shift A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2/21/2011, Shift A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2/22/2011, Shift A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2/27/2011, Shift A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2/28/2011, Shift A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/1/2011, Shift A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/2/2011, Shift A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/6/2011, Shift A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/7/2011, Shift A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/8/2011, Shift A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/13/2011, Shift A&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ShiftADates, ShiftBDates, ShiftCDates, ShiftDDates&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2/20/2011, 2/20/2011, 2/23/2011, 2/23/2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2/21/2011, 2/21/2011, 2/24/2011, 2/24/2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2/22/2011, 2/22/2011, 2/25/2011, 2/25/2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2/27/2011, 2/26/2011, 2/26/2011, 3/2/2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2/28/2011, 2/27/2011, 3/3/2011, 3/3/2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/1/2011, 2/28/2011, 3/4/2011, 3/4/2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/2/2011, 3/1/2011, 3/5/2011, 3/5/2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/6/2011, 3/6/2011, 3/9/2011, 3/9/2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/7/2011, 3/7/2011, 3/10/2011, 3/10/2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/8/2011, 3/8/2011, 3/11/2011, 3/11/2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/13/2011, 3/12/2011, 3/12/2011, 3/16/2011&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;But I still don't know how to relate the excel generated dates to the update_date field. To further explain what needs to be done, I need to be able to get all the results related to dates in the update_date field that pertain to a certain shift. Perhaps there's a searchbox/bookmark combo that I can use? I've played around with a master calendar but still don't know how to relate/link/associate any of the fields to update_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I'll be checking this until this evening, but I won't be able to respond until Sunday morning. Thanks for all the assistance.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2012 21:58:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245802#M1179025</guid>
      <dc:creator />
      <dc:date>2012-02-01T21:58:11Z</dc:date>
    </item>
    <item>
      <title>Separating Date Field by Staggered Shift Schedule</title>
      <link>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245803#M1179026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if I understand what you want to achieve with the update_date, since in the first table, you seem to already assign a label (Shift A) to maybe filter your update_date values?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you load your second table (I think this is the one you create by excel) like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SHIFTS:&lt;/P&gt;&lt;P&gt;CROSSTABLE (Shifts, update_date) LOAD recno(), * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ShiftADates, ShiftBDates, ShiftCDates, ShiftDDates&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2/20/2011, 2/20/2011, 2/23/2011, 2/23/2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2/21/2011, 2/21/2011, 2/24/2011, 2/24/2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2/22/2011, 2/22/2011, 2/25/2011, 2/25/2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2/27/2011, 2/26/2011, 2/26/2011, 3/2/2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2/28/2011, 2/27/2011, 3/3/2011, 3/3/2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/1/2011, 2/28/2011, 3/4/2011, 3/4/2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/2/2011, 3/1/2011, 3/5/2011, 3/5/2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/6/2011, 3/6/2011, 3/9/2011, 3/9/2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/7/2011, 3/7/2011, 3/10/2011, 3/10/2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/8/2011, 3/8/2011, 3/11/2011, 3/11/2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/13/2011, 3/12/2011, 3/12/2011, 3/16/2011&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your crosstable will be transformed into a straight table with two field, update_date (this will link to your other table) and Shifts, that label your dates accordingly. So you can easily select the update_dates that a certain shift has been working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe this gives you an idea, if this is not helping you, maybe you could elaborate a bit more what you need to do with the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2012 22:50:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245803#M1179026</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-02-01T22:50:52Z</dc:date>
    </item>
    <item>
      <title>Separating Date Field by Staggered Shift Schedule</title>
      <link>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245804#M1179027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you. I will try your suggestion and if needed I can certainly elaborate on this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2012 12:50:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245804#M1179027</guid>
      <dc:creator />
      <dc:date>2012-02-06T12:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: Separating Date Field by Staggered Shift Schedule</title>
      <link>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245805#M1179028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is partially what I needed, thank you. What seems to be happening with that code is that it's merely adding records to to the exisiting update_date field such as "2/20/2011 12:00:00 AM". I was hoping that I could give Qlikview a list of dates and somehow link those dates to the existing update_date field. So when I click "ShiftADates" in the inline "Shifts" field, it would narrow down the possible dates to the "ShiftADates".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I still need some way to indicate the times, too (6:00 AM-6:30 PM and so on as shown in the above picture). I'm now running into the problem that the only times pulled are 12:00:00 AM. Should I add...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;SPAN style="font-size: 10pt;"&gt; h:mm:ss[.fff]&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&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;SPAN style="font-size: 10pt;"&gt;...﻿to the end of all the dates or something similar? It'll be a snap to do if needed, don't worry about that. Or maybe a search box/bookmark approach?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2012 14:20:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245805#M1179028</guid>
      <dc:creator />
      <dc:date>2012-02-06T14:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Separating Date Field by Staggered Shift Schedule</title>
      <link>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245806#M1179029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I'm reaching the end of my sanity with this thing. To clarify, this is my predicament:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I have a date field I'm loading from a database, &lt;STRONG&gt;update_date&lt;/STRONG&gt;.&lt;UL&gt;&lt;LI&gt;This field is in the following format: 6/1/2011 12:33:44 PM&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;I have every date each shift does and does not work up to 2025 in D/M/YYYY format on an excel sheet and can rearrange as needed&lt;/LI&gt;&lt;LI&gt;I need to filter the update_date field by Shift on demand (button/bookmark/etc)&lt;/LI&gt;&lt;LI&gt;I cannot figure out how to associate the date values in update_date with any inline data&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2012 18:42:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245806#M1179029</guid>
      <dc:creator />
      <dc:date>2012-02-06T18:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: Separating Date Field by Staggered Shift Schedule</title>
      <link>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245807#M1179030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understood that you want to match some Timestamps to intervals (these intervals are defined by your Shifts). So when picking any Timestamp (update_date), you want to see in which Shift that happens, and for each Shift, you want to see any associated Timestamps, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One way to do this would be to create a StartTime and a EndTime for each Shift, for each date. You could do this in Excel and import the three fields StartTime, EndTime, Shift or create them in the load script.&lt;/P&gt;&lt;P&gt;Then you could use an IntervalMatch load prefix to create a link between these Start and End times and your update_date timestamps.&lt;/P&gt;&lt;P&gt;Please look into the Help, IntervalMatch, for more info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since your StartTime and EndTime follow a strict rule / pattern, I decided to choose another approach. You could just load the update_date field from your DB and then check for the assocoiated Shift by some Date / Time comparision. Maybe like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vShiftCalendarStart = '2/20/2011';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Create some demo update_date Timestamps&lt;/P&gt;&lt;P&gt;DEMO:&amp;nbsp; &lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;TimeStamp($(#vShiftCalendarStart)+RAND()*30) as update_date1&lt;/P&gt;&lt;P&gt;autogenerate 100;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Create the Association to Shifts &lt;/P&gt;&lt;P&gt;RESULT:&lt;/P&gt;&lt;P&gt;LOAD *, &lt;/P&gt;&lt;P&gt;if(ShiftA,'ShiftA ','')&amp;amp;if(ShiftB,'ShiftB ','')&amp;amp;if(ShiftC,'ShiftC ','')&amp;amp;if(ShiftD,'ShiftD','') as WhichShifts;&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; &lt;/P&gt;&lt;P&gt;update_date1,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(match(Mod(DayStart(update_date1,)-$(#vCalendarStart),14),'0','1','2','7','8','9','10') &lt;/P&gt;&lt;P&gt;and (frac(update_date1) &amp;lt;= maketime(18,30)) and (frac(update_date1) &amp;gt;= maketime(6)) ,1,0) as ShiftA, //3-4-4-3 daytime schedule&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(match(Mod(daystart(DayStart(update_date1,0,maketime(18)))-$(#vCalendarStart),14),'0','1','2','6','7','8','9') &lt;/P&gt;&lt;P&gt;and ((frac(update_date1) &amp;lt;= maketime(6,30))&amp;nbsp; or (frac(update_date1) &amp;gt;= maketime(18))),1,0) as ShiftB, //3-3-4-4 nighttime schedule&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(match(Mod(DayStart(update_date1,)-$(#vCalendarStart),14),'3','4','5','6','11','12','13') &lt;/P&gt;&lt;P&gt;and (frac(update_date1) &amp;lt;= maketime(18,30)) and (frac(update_date1) &amp;gt;= maketime(6)) ,1,0) as ShiftC, //4-4-3-3 daytime shedule&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(match(Mod(daystart(DayStart(update_date1,0,maketime(18)))-$(#vCalendarStart),14),'3','4','5','10','11','12','13') &lt;/P&gt;&lt;P&gt;and ((frac(update_date1) &amp;lt;= maketime(6,30)) or (frac(update_date1) &amp;gt;= maketime(18))),1,0) as ShiftD&amp;nbsp; //3-4-4-3 nighttime schedule&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resident DEMO;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here, I first created four flag field to check for each update_date Timestamp if it is located within the shift (match the day, taking date crossing into account and compare times), then I concatenated the results into one field (since your shifts overlap, update_date could be associated to more then one Shift).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2012 23:28:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245807#M1179030</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-02-06T23:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: Separating Date Field by Staggered Shift Schedule</title>
      <link>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245808#M1179031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; The QVD you provided worked like a charm when I plugged in all the values from my excel file; but for some reason I'm getting a "script failed to load" error when I try plugging it into my actual QVD. Is there anything in your code I need to take out to use it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I noticed your script doesn't have the "SET MonthNames" or the "SET DayNames", my QVD does. Not sure if that would do anything though. Maybe the "DEMO" terms? I have no idea why it's not loading.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2012 19:38:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245808#M1179031</guid>
      <dc:creator />
      <dc:date>2012-02-07T19:38:31Z</dc:date>
    </item>
    <item>
      <title>Separating Date Field by Staggered Shift Schedule</title>
      <link>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245809#M1179032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post your script? I don't think the missing MonthNames and DayNames will do any harm, at least there shouldn't be a script error. At worst, wrong format settings may lead to non-matching values or wrongly parsed input values.&lt;/P&gt;&lt;P&gt;Could you also post some lines of your input format together with you script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2012 19:48:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245809#M1179032</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-02-07T19:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: Separating Date Field by Staggered Shift Schedule</title>
      <link>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245810#M1179033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's the code on my QVD:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;SET ThousandSep=',';&lt;BR /&gt;SET DecimalSep='.';&lt;BR /&gt;SET MoneyThousandSep=',';&lt;BR /&gt;SET MoneyDecimalSep='.';&lt;BR /&gt;SET MoneyFormat='$#,##0.00;($#,##0.00)';&lt;BR /&gt;SET TimeFormat='h:mm:ss TT';&lt;BR /&gt;SET DateFormat='M/D/YYYY';&lt;BR /&gt;SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';&lt;BR /&gt;SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';&lt;BR /&gt;SET DayNames='Sun;Mon;Tue;Wed;Thu;Fri;Sat';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OLEDB CONNECT TO [Provider=SQLOLEDB.1;Persist Security Info=True;User ID=********;Initial Catalog=request_report;Data Source=fc8sqlpcl;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=*******;Use Encryption for Data=False;Tag with column collation when possible=False] (XPassword is MOmJ8jhOJpoiuhiUh);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;BR /&gt;FROM "Request_t".dbo."V_t" &lt;BR /&gt;where&lt;BR /&gt;(app_id=3 or app_id=22 or app_id=63)&lt;BR /&gt;and&lt;BR /&gt;(status_id != 0 and status_id != 11)&lt;BR /&gt;and&lt;BR /&gt;(status_name != 'Not Feasible' and status_name != 'Closed - No t Required');&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; app_id, app_name&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3, FSR&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 22, RTE&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 63, UAR&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SHIFTS:&lt;BR /&gt;CROSSTABLE (Shifts, update_date) LOAD recno(), * INLINE [&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ShiftADates, ShiftBDates, ShiftCDates, ShiftDDates&lt;BR /&gt;2/20/2011,2/20/2011,2/23/2011,2/23/2011&lt;BR /&gt;2/21/2011,2/21/2011,2/24/2011,2/24/2011&lt;BR /&gt;2/22/2011,2/22/2011,2/25/2011,2/25/2011&lt;BR /&gt;2/27/2011,2/26/2011,2/26/2011,3/2/2011&lt;BR /&gt;2/28/2011,2/27/2011,3/3/2011,3/3/2011&lt;BR /&gt;3/1/2011,2/28/2011,3/4/2011,3/4/2011&lt;BR /&gt;3/2/2011,3/1/2011,3/5/2011,3/5/2011&lt;BR /&gt;3/6/2011,3/6/2011,3/9/2011,3/9/2011&lt;BR /&gt;3/7/2011,3/7/2011,3/10/2011,3/10/2011&lt;BR /&gt;3/8/2011,3/8/2011,3/11/2011,3/11/2011&lt;BR /&gt;3/13/2011,3/12/2011,3/12/2011,3/16/2011&lt;BR /&gt;3/14/2011,3/13/2011,3/17/2011,3/17/2011&lt;BR /&gt;3/15/2011,3/14/2011,3/18/2011,3/18/2011&lt;BR /&gt;3/16/2011,3/15/2011,3/19/2011,3/19/2011&lt;BR /&gt;3/20/2011,3/20/2011,3/23/2011,3/23/2011&lt;BR /&gt;3/21/2011,3/21/2011,3/24/2011,3/24/2011&lt;BR /&gt;3/22/2011,3/22/2011,3/25/2011,3/25/2011&lt;BR /&gt;3/27/2011,3/26/2011,3/26/2011,3/30/2011&lt;BR /&gt;3/28/2011,3/27/2011,3/31/2011,3/31/2011&lt;BR /&gt;3/29/2011,3/28/2011,4/1/2011,4/1/2011&lt;BR /&gt;3/30/2011,3/29/2011,4/2/2011,4/2/2011&lt;BR /&gt;4/3/2011,4/3/2011,4/6/2011,4/6/2011&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Let vShiftCalendarStart = '2/20/2011';&lt;/P&gt;&lt;P&gt;DEMO:&lt;BR /&gt;LOAD &lt;BR /&gt;TimeStamp($(#vShiftCalendarStart)+RAND()*30) as update_date1&lt;BR /&gt;autogenerate 100;&lt;/P&gt;&lt;P&gt;PRESULT:&lt;BR /&gt;LOAD *, &lt;BR /&gt;if(ShiftA,'ShiftA ','')&amp;amp;if(ShiftB,'ShiftB ','')&amp;amp;if(ShiftC,'ShiftC ','')&amp;amp;if(ShiftD,'ShiftD','') as WhichShifts;&lt;BR /&gt;LOAD&amp;nbsp; &lt;BR /&gt;update_date1,&lt;BR /&gt;if(match(Mod(DayStart(update_date1,)-$(#vCalendarStart),14),'0','1','2','7','8','9','10') &lt;BR /&gt;and (frac(update_date1) &amp;lt;= maketime(18,30)) and (frac(update_date1) &amp;gt;= maketime(6)) ,1,0) as ShiftA, //3-4-4-3 daytime schedule&lt;BR /&gt;if(match(Mod(daystart(DayStart(update_date1,0,maketime(18)))-$(#vCalendarStart),14),'0','1','2','6','7','8','9') &lt;BR /&gt;and ((frac(update_date1) &amp;lt;= maketime(6,30))&amp;nbsp; or (frac(update_date1) &amp;gt;= maketime(18))),1,0) as ShiftB, //3-3-4-4 nighttime schedule&lt;BR /&gt;if(match(Mod(DayStart(update_date1,)-$(#vCalendarStart),14),'3','4','5','6','11','12','13') &lt;BR /&gt;and (frac(update_date1) &amp;lt;= maketime(18,30)) and (frac(update_date1) &amp;gt;= maketime(6)) ,1,0) as ShiftC, //4-4-3-3 daytime shedule&lt;BR /&gt;if(match(Mod(daystart(DayStart(update_date1,0,maketime(18)))-$(#vCalendarStart),14),'3','4','5','10','11','12','13') &lt;BR /&gt;and ((frac(update_date1) &amp;lt;= maketime(6,30)) or (frac(update_date1) &amp;gt;= maketime(18))),1,0) as ShiftD&amp;nbsp; //3-4-4-3 nighttime schedule&lt;BR /&gt;Resident DEMO;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;For brevity's sake I clipped a bunch of the inline csv lines, they go up to 1/1/2026.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2012 20:46:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245810#M1179033</guid>
      <dc:creator />
      <dc:date>2012-02-07T20:46:12Z</dc:date>
    </item>
    <item>
      <title>Separating Date Field by Staggered Shift Schedule</title>
      <link>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245811#M1179034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hm, the inline csv lines are to create the shift calendar?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe my previously attached script was a bit confusing in that point, I believe you don't really need the inline table at all. I forgot to delete the table from my script, but essentially all you need is posted in the text of my yesterday's posting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a variable vShiftCalendarStart which should be the starting point for your shift calendar (since the shifts are repeating, it will be an mostly arbitrary date).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've chosen '2/20/2011' and for example, Shift A is on duty on day shift on days &lt;CODE class="jive-code"&gt;'0','1','2','7','8','9','10' relative to that day, i.e. 2/20, 2/21, 2/22, 2/27...&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Demo table probably needs to be replaced by your table load, my Demo table just creates some update_date data. Ah, I used update_date1 as field name, so you probably need to rename my update_date1 to update_date in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't see anything wrong with the script at first glance, so if you still get a script error, could you post the error description? It might also worth while stepping through the script in debug mode (from script editor).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2012 21:07:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245811#M1179034</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-02-07T21:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: Separating Date Field by Staggered Shift Schedule</title>
      <link>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245812#M1179035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can do away with the inline table no problem as long as some script works in place of it. The error that keeps popping up when I try to reload is "Execution of script failed. Reload old data?", even in the debugger. I've tried a variety of modifications to your post for my purposes, two are below that I've tried. Maybe you could paste the script needed after the "app_id" entry while assuming I'll be loading update_date from the server? Thanks for your time and patience.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;SET ThousandSep=',';&lt;BR /&gt;SET DecimalSep='.';&lt;BR /&gt;SET MoneyThousandSep=',';&lt;BR /&gt;SET MoneyDecimalSep='.';&lt;BR /&gt;SET MoneyFormat='$#,##0.00;($#,##0.00)';&lt;BR /&gt;SET TimeFormat='h:mm:ss TT';&lt;BR /&gt;SET DateFormat='M/D/YYYY';&lt;BR /&gt;SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';&lt;BR /&gt;SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';&lt;BR /&gt;SET DayNames='Sun;Mon;Tue;Wed;Thu;Fri;Sat';&lt;/P&gt;&lt;P&gt;//connect statement&lt;BR /&gt;OLEDB CONNECT TO [Provider=SQLOLEDB.1;Persist Security Info=True;User ID=0wdjh0;Initial Catalog=request_report;Data Source=fc8sqlpcl;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=wdawdawd;Use Encryption for Data=False;Tag with column collation when possible=False] (XPassword is MCMePZVMBDZMWQNOULRB);&lt;/P&gt;&lt;P&gt;//Loading only FSRs, RTEs and UARs; filtering out Cancelled, Draft, Closed - No CR Required and Not Feasible.&lt;BR /&gt;SQL SELECT *&lt;BR /&gt;FROM "Request_report".dbo."V_MSR" &lt;BR /&gt;where&lt;BR /&gt;(app_id=3 or app_id=22 or app_id=63)&lt;BR /&gt;and&lt;BR /&gt;(status_id != 0 and status_id != 11)&lt;BR /&gt;and&lt;BR /&gt;(status_name != 'Not Feasible' and status_name != 'Closed - No CR Required');&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; app_id, app_name&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3, FSR&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 22, RTE&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 63, UAR&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Let vShiftCalendarStart = '2/20/2011';&lt;/P&gt;&lt;P&gt;PRESULT:&lt;BR /&gt;LOAD *, &lt;BR /&gt;if(ShiftA,'ShiftA ','')&amp;amp;if(ShiftB,'ShiftB ','')&amp;amp;if(ShiftC,'ShiftC ','')&amp;amp;if(ShiftD,'ShiftD','') as WhichShifts;&lt;BR /&gt;LOAD&amp;nbsp; &lt;BR /&gt;update_date1,&lt;BR /&gt;if(match(Mod(DayStart(update_date1,)-$(#vCalendarStart),14),'0','1','2','7','8','9','10') &lt;BR /&gt;and (frac(update_date1) &amp;lt;= maketime(18,30)) and (frac(update_date1) &amp;gt;= maketime(6)) ,1,0) as ShiftA, //3-4-4-3 daytime schedule&lt;BR /&gt;if(match(Mod(daystart(DayStart(update_date1,0,maketime(18)))-$(#vCalendarStart),14),'0','1','2','6','7','8','9') &lt;BR /&gt;and ((frac(update_date1) &amp;lt;= maketime(6,30))&amp;nbsp; or (frac(update_date1) &amp;gt;= maketime(18))),1,0) as ShiftB, //3-3-4-4 nighttime schedule&lt;BR /&gt;if(match(Mod(DayStart(update_date1,)-$(#vCalendarStart),14),'3','4','5','6','11','12','13') &lt;BR /&gt;and (frac(update_date1) &amp;lt;= maketime(18,30)) and (frac(update_date1) &amp;gt;= maketime(6)) ,1,0) as ShiftC, //4-4-3-3 daytime shedule&lt;BR /&gt;if(match(Mod(daystart(DayStart(update_date1,0,maketime(18)))-$(#vCalendarStart),14),'3','4','5','10','11','12','13') &lt;BR /&gt;and ((frac(update_date1) &amp;lt;= maketime(6,30)) or (frac(update_date1) &amp;gt;= maketime(18))),1,0) as ShiftD&amp;nbsp; //3-4-4-3 nighttime schedule&lt;BR /&gt;Resident DEMO;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;SET ThousandSep=',';&lt;BR /&gt;SET DecimalSep='.';&lt;BR /&gt;SET MoneyThousandSep=',';&lt;BR /&gt;SET MoneyDecimalSep='.';&lt;BR /&gt;SET MoneyFormat='$#,##0.00;($#,##0.00)';&lt;BR /&gt;SET TimeFormat='h:mm:ss TT';&lt;BR /&gt;SET DateFormat='M/D/YYYY';&lt;BR /&gt;SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';&lt;BR /&gt;SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';&lt;BR /&gt;SET DayNames='Sun;Mon;Tue;Wed;Thu;Fri;Sat';&lt;/P&gt;&lt;P&gt;//connect statement&lt;BR /&gt;OLEDB CONNECT TO [Provider=SQLOLEDB.1;Persist Security Info=True;User ID=sefsfsef;Initial Catalog=request_report;Data Source=fsfsef;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=efsefs;Use Encryption for Data=False;Tag with column collation when possible=False] (XPassword is MCMePZVMBDZMWQNOULRB);&lt;/P&gt;&lt;P&gt;//Loading only FSRs, RTEs and UARs; filtering out Cancelled, Draft, Closed - No CR Required and Not Feasible.&lt;BR /&gt;SQL SELECT *&lt;BR /&gt;FROM "Request_report".dbo."V_MSR" &lt;BR /&gt;where&lt;BR /&gt;(app_id=3 or app_id=22 or app_id=63)&lt;BR /&gt;and&lt;BR /&gt;(status_id != 0 and status_id != 11)&lt;BR /&gt;and&lt;BR /&gt;(status_name != 'Not Feasible' and status_name != 'Closed - No CR Required');&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; app_id, app_name&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3, FSR&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 22, RTE&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 63, UAR&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Let vShiftCalendarStart = '2/20/2011';&lt;/P&gt;&lt;P&gt;PRESULT:&lt;BR /&gt;LOAD *, &lt;BR /&gt;if(ShiftA,'ShiftA ','')&amp;amp;if(ShiftB,'ShiftB ','')&amp;amp;if(ShiftC,'ShiftC ','')&amp;amp;if(ShiftD,'ShiftD','') as WhichShifts;&lt;BR /&gt;LOAD&amp;nbsp; &lt;BR /&gt;update_date,&lt;BR /&gt;if(match(Mod(DayStart(update_date,)-$(#vCalendarStart),14),'0','1','2','7','8','9','10') &lt;BR /&gt;and (frac(update_date) &amp;lt;= maketime(18,30)) and (frac(update_date) &amp;gt;= maketime(6)) ,1,0) as ShiftA, //3-4-4-3 daytime schedule&lt;BR /&gt;if(match(Mod(daystart(DayStart(update_date,0,maketime(18)))-$(#vCalendarStart),14),'0','1','2','6','7','8','9') &lt;BR /&gt;and ((frac(update_date) &amp;lt;= maketime(6,30))&amp;nbsp; or (frac(update_date) &amp;gt;= maketime(18))),1,0) as ShiftB, //3-3-4-4 nighttime schedule&lt;BR /&gt;if(match(Mod(DayStart(update_date,)-$(#vCalendarStart),14),'3','4','5','6','11','12','13') &lt;BR /&gt;and (frac(update_date) &amp;lt;= maketime(18,30)) and (frac(update_date) &amp;gt;= maketime(6)) ,1,0) as ShiftC, //4-4-3-3 daytime shedule&lt;BR /&gt;if(match(Mod(daystart(DayStart(update_date,0,maketime(18)))-$(#vCalendarStart),14),'3','4','5','10','11','12','13') &lt;BR /&gt;and ((frac(update_date) &amp;lt;= maketime(6,30)) or (frac(update_date) &amp;gt;= maketime(18))),1,0) as ShiftD&amp;nbsp; //3-4-4-3 nighttime schedule&lt;BR /&gt;Resident DEMO;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you could paste the script needed after the "app_id" entry while assuming I'll be loading update_date from the server?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2012 22:01:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245812#M1179035</guid>
      <dc:creator />
      <dc:date>2012-02-07T22:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: Separating Date Field by Staggered Shift Schedule</title>
      <link>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245813#M1179036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried commenting my part out, just loading your data? You do a Select *, I would recommend to only load the fields needed and state them in your select, thus I can also see what you are actually loading &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you need to label your tables and use your table name in the resident load instead of DEMO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET ThousandSep=',';&lt;/P&gt;&lt;P&gt;SET DecimalSep='.';&lt;/P&gt;&lt;P&gt;SET MoneyThousandSep=',';&lt;/P&gt;&lt;P&gt;SET MoneyDecimalSep='.';&lt;/P&gt;&lt;P&gt;SET MoneyFormat='$#,##0.00;($#,##0.00)';&lt;/P&gt;&lt;P&gt;SET TimeFormat='h:mm:ss TT';&lt;/P&gt;&lt;P&gt;SET DateFormat='M/D/YYYY';&lt;/P&gt;&lt;P&gt;SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';&lt;/P&gt;&lt;P&gt;SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';&lt;/P&gt;&lt;P&gt;SET DayNames='Sun;Mon;Tue;Wed;Thu;Fri;Sat';&lt;/P&gt;&lt;P&gt;//connect statement&lt;/P&gt;&lt;P&gt;OLEDB CONNECT TO [Provider=SQLOLEDB.1;Persist Security Info=True;User ID=sefsfsef;Initial Catalog=request_report;Data Source=fsfsef;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=efsefs;Use Encryption for Data=False;Tag with column collation when possible=False] (XPassword is MCMePZVMBDZMWQNOULRB);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Loading only FSRs, RTEs and UARs; filtering out Cancelled, Draft, Closed - No CR Required and Not Feasible.&lt;/P&gt;&lt;P&gt;//Label your Table&lt;/P&gt;&lt;P&gt;Input:&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM "Request_report".dbo."V_MSR" &lt;/P&gt;&lt;P&gt;where&lt;/P&gt;&lt;P&gt;(app_id=3 or app_id=22 or app_id=63)&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;(status_id != 0 and status_id != 11)&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;(status_name != 'Not Feasible' and status_name != 'Closed - No CR Required');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AppNameTable:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; app_id, app_name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3, FSR&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 22, RTE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 63, UAR&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vShiftCalendarStart = '2/20/2011';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RESULT:&lt;/P&gt;&lt;P&gt;LOAD *, &lt;/P&gt;&lt;P&gt;if(ShiftA,'ShiftA ','')&amp;amp;if(ShiftB,'ShiftB ','')&amp;amp;if(ShiftC,'ShiftC ','')&amp;amp;if(ShiftD,'ShiftD','') as WhichShifts;&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; &lt;/P&gt;&lt;P&gt;update_date, &lt;/P&gt;&lt;P&gt;app_id, &lt;/P&gt;&lt;P&gt;status_id, &lt;/P&gt;&lt;P&gt;status_name,&lt;/P&gt;&lt;P&gt;if(match(Mod(DayStart(update_date,)-$(#vCalendarStart),14),'0','1','2','7','8','9','10') &lt;/P&gt;&lt;P&gt;and (frac(update_date) &amp;lt;= maketime(18,30)) and (frac(update_date) &amp;gt;= maketime(6)) ,1,0) as ShiftA, //3-4-4-3 daytime schedule&lt;/P&gt;&lt;P&gt;if(match(Mod(daystart(DayStart(update_date,0,maketime(18)))-$(#vCalendarStart),14),'0','1','2','6','7','8','9') &lt;/P&gt;&lt;P&gt;and ((frac(update_date) &amp;lt;= maketime(6,30))&amp;nbsp; or (frac(update_date) &amp;gt;= maketime(18))),1,0) as ShiftB, //3-3-4-4 nighttime schedule&lt;/P&gt;&lt;P&gt;if(match(Mod(DayStart(update_date,)-$(#vCalendarStart),14),'3','4','5','6','11','12','13') &lt;/P&gt;&lt;P&gt;and (frac(update_date) &amp;lt;= maketime(18,30)) and (frac(update_date) &amp;gt;= maketime(6)) ,1,0) as ShiftC, //4-4-3-3 daytime shedule&lt;/P&gt;&lt;P&gt;if(match(Mod(daystart(DayStart(update_date,0,maketime(18)))-$(#vCalendarStart),14),'3','4','5','10','11','12','13') &lt;/P&gt;&lt;P&gt;and ((frac(update_date) &amp;lt;= maketime(6,30)) or (frac(update_date) &amp;gt;= maketime(18))),1,0) as ShiftD&amp;nbsp; //3-4-4-3 nighttime schedule&lt;/P&gt;&lt;P&gt;Resident Input;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any better success?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2012 23:11:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245813#M1179036</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-02-07T23:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: Separating Date Field by Staggered Shift Schedule</title>
      <link>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245814#M1179037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I will try that Sunday when I get back to the grindstone. Thank you for all your time, I'll let you know how I fare next week.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2012 23:21:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245814#M1179037</guid>
      <dc:creator />
      <dc:date>2012-02-07T23:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: Separating Date Field by Staggered Shift Schedule</title>
      <link>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245815#M1179038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I still get the same "Expression failed to load. Reload old data?" error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET ThousandSep=',';&lt;BR /&gt;SET DecimalSep='.';&lt;BR /&gt;SET MoneyThousandSep=',';&lt;BR /&gt;SET MoneyDecimalSep='.';&lt;BR /&gt;SET MoneyFormat='$#,##0.00;($#,##0.00)';&lt;BR /&gt;SET TimeFormat='h:mm:ss TT';&lt;BR /&gt;SET DateFormat='M/D/YYYY';&lt;BR /&gt;SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';&lt;BR /&gt;SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';&lt;BR /&gt;SET DayNames='Sun;Mon;Tue;Wed;Thu;Fri;Sat';&lt;BR /&gt;4:07 PM 2/12/2012&lt;BR /&gt;//connect statement&lt;BR /&gt;OLEDB CONNECT TO [Provider=SQLOLEDB.1;Persist Security Info=True;User ID=userID;Initial Catalog=request_report;Data Source=fc8sqlpcl;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=LFCNOTD1032MNC;Use Encryption for Data=False;Tag with column collation when possible=False] (XPassword is MCMePZVMBDZMWQNOULRB);&lt;/P&gt;&lt;P&gt;//Loading only FSRs, RTEs and UARs; filtering out Cancelled, Draft, Closed - No CR Required and Not Feasible.&lt;BR /&gt;Input:&lt;BR /&gt;SQL SELECT *&lt;BR /&gt;FROM "Request_report".dbo."V_MSR" &lt;BR /&gt;where&lt;BR /&gt;(app_id=3 or app_id=22 or app_id=63)&lt;BR /&gt;and&lt;BR /&gt;(status_id != 0 and status_id != 11)&lt;BR /&gt;and&lt;BR /&gt;(status_name != 'Not Feasible' and status_name != 'Closed - No CR Required');&lt;BR /&gt; &lt;BR /&gt;AppNameTable:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; app_id, app_name&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3, FSR&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 22, RTE&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 63, UAR&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Let vShiftCalendarStart = '2/20/2011';&lt;BR /&gt; &lt;BR /&gt;RESULT:&lt;BR /&gt;LOAD *, &lt;BR /&gt;if(ShiftA,'ShiftA ','')&amp;amp;if(ShiftB,'ShiftB ','')&amp;amp;if(ShiftC,'ShiftC ','')&amp;amp;if(ShiftD,'ShiftD','') as WhichShifts;&lt;BR /&gt;LOAD&amp;nbsp; &lt;BR /&gt;update_date, &lt;BR /&gt;app_id, &lt;BR /&gt;status_id, &lt;BR /&gt;status_name,&lt;BR /&gt;if(match(Mod(DayStart(update_date,)-$(#vCalendarStart),14),'0','1','2','7','8','9','10') &lt;BR /&gt;and (frac(update_date) &amp;lt;= maketime(18,30)) and (frac(update_date) &amp;gt;= maketime(6)) ,1,0) as ShiftA, //3-4-4-3 daytime schedule&lt;BR /&gt;if(match(Mod(daystart(DayStart(update_date,0,maketime(18)))-$(#vCalendarStart),14),'0','1','2','6','7','8','9') &lt;BR /&gt;and ((frac(update_date) &amp;lt;= maketime(6,30))&amp;nbsp; or (frac(update_date) &amp;gt;= maketime(18))),1,0) as ShiftB, //3-3-4-4 nighttime schedule&lt;BR /&gt;if(match(Mod(DayStart(update_date,)-$(#vCalendarStart),14),'3','4','5','6','11','12','13') &lt;BR /&gt;and (frac(update_date) &amp;lt;= maketime(18,30)) and (frac(update_date) &amp;gt;= maketime(6)) ,1,0) as ShiftC, //4-4-3-3 daytime shedule&lt;BR /&gt;if(match(Mod(daystart(DayStart(update_date,0,maketime(18)))-$(#vCalendarStart),14),'3','4','5','10','11','12','13') &lt;BR /&gt;and ((frac(update_date) &amp;lt;= maketime(6,30)) or (frac(update_date) &amp;gt;= maketime(18))),1,0) as ShiftD&amp;nbsp; //3-4-4-3 nighttime schedule&lt;BR /&gt;Resident Input;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I still missing something?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Feb 2012 21:08:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245815#M1179038</guid>
      <dc:creator />
      <dc:date>2012-02-12T21:08:23Z</dc:date>
    </item>
    <item>
      <title>Separating Date Field by Staggered Shift Schedule</title>
      <link>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245816#M1179039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found some possible issues:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your posted script, there is a line which I think shouldn't be there (just after the first ten SET statements):&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;4:07 PM 2/12/2012&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I think the main problem is that I defined a variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;Let vShiftCalendarStart = '2/20/2011';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but later on used &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;#vCalendarStart&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in several statements of the RESULT load. This is giving a script error almost for sure. You need to use a single, same name in defining and calling of the variable (it was my mistake, since I renamed once the name in the LET statement, but forget to remove the already defined variable and change all occurences to the same name).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this does not help, please enable logging in the document properties and post the log file of the script execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Feb 2012 23:06:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245816#M1179039</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-02-12T23:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Separating Date Field by Staggered Shift Schedule</title>
      <link>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245817#M1179040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course by the time I got to try it again, the criterias changed. The field I need to compare against is add_date, not update_date. I used your suggestions and changed the script so it looks like this after the SET statements:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; color: green; font-family: 'Courier New';"&gt;//connect statement&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;OLEDB&lt;/SPAN&gt; &lt;STRONG style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;CONNECT&lt;/STRONG&gt; &lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;TO&lt;/SPAN&gt; &lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;[Provider=SQLOLEDB.1;Persist Security Info=True;User ID=username;Initial Catalog=request_report;Data Source=source;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=workstation;Use Encryption for Data=False;Tag with column collation when possible=False]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt; (&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;XPassword&lt;/SPAN&gt; &lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt; MCMePZVMBDZMWQNOULRB);&lt;BR /&gt;&lt;SPAN style="font-size: 9pt; color: green; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: green; font-size: 9pt; font-family: 'Courier New';"&gt;//Loading only FSRs, RTEs and UARs; filtering out Cancelled, Draft, Closed - No CR Required and Not Feasible.&lt;STRONG style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;SQL&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt; SELECT update_date as "history_update_date",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; status_name as "history_status_name",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "request_id",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "app_id"&lt;BR /&gt;FROM "Request_report".dbo."V_REQUEST_HISTORY"&lt;BR /&gt;where&lt;BR /&gt;(app_id=3 or app_id=22 or app_id=63);&lt;BR /&gt;&lt;SPAN style="font-size: 9pt; color: green; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: green; font-size: 9pt; font-family: 'Courier New';"&gt;//Loading only FSRs, RTEs and UARs; filtering out Cancelled, Draft, Closed - No CR Required and Not Feasible.&lt;STRONG style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;SQL&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt; SELECT *&lt;BR /&gt;FROM "Request_report".dbo."V_MSR"&lt;BR /&gt;where&lt;BR /&gt;(app_id=3 or app_id=22 or app_id=63)&lt;BR /&gt;and&lt;BR /&gt;(status_id != 0 and status_id != 11)&lt;BR /&gt;and&lt;BR /&gt;(status_name != 'Not Feasible' and status_name != 'Closed - No CR Required');&lt;BR /&gt;&lt;SPAN style="font-size: 9pt; color: green; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: green; font-size: 9pt; font-family: 'Courier New';"&gt;//Mapping existing app_id table to contextual names&lt;STRONG style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt; * &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;INLINE&lt;/SPAN&gt; &lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;[&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; app_id, app_name&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3, FSR&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 22, RTE&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 63, UAR&lt;BR /&gt;]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;Let&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9pt; font-family: 'Courier New';"&gt;vShiftCalendarStart&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt; = '2/20/2011';&lt;BR /&gt;&lt;BR /&gt;RESULT:&lt;STRONG style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt; *,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;ShiftA&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;,'ShiftA ','')&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;ShiftB&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;,'ShiftB ','')&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;ShiftC&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;,'ShiftC ','')&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;ShiftD&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;,'ShiftD','') &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;WhichShifts&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;&amp;nbsp; &lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;add_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;, &lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;match&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;Mod&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;DayStart&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;add_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;,)-&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9pt; font-family: 'Courier New';"&gt;$(#vShiftCalendarStart)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;,14),'0','1','2','7','8','9','10') &lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt; (&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;frac&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;add_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;) &amp;lt;= &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(18,30)) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt; (&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;frac&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;add_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;) &amp;gt;= &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(6)) ,1,0) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;ShiftA&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: green; font-family: 'Courier New';"&gt;//3-4-4-3 daytime schedule&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;match&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;Mod&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;daystart&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;DayStart&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;add_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;,0,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(18)))-&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: green; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9pt; font-family: 'Courier New';"&gt;$(#vShiftCalendarStart)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;,14),'0','1','2','6','7','8','9') &lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt; ((&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;frac&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;add_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;) &amp;lt;= &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(6,30))&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;or&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt; (&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;frac&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;add_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;) &amp;gt;= &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(18))),1,0) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;ShiftB&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: green; font-family: 'Courier New';"&gt;//3-3-4-4 nighttime schedule&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;match&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;Mod&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;DayStart&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;add_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;,)-&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: green; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9pt; font-family: 'Courier New';"&gt;$(#vShiftCalendarStart)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;,14),'3','4','5','6','11','12','13') &lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt; (&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;frac&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;add_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;) &amp;lt;= &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(18,30)) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt; (&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;frac&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;add_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;) &amp;gt;= &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(6)) ,1,0) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;ShiftC&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: green; font-family: 'Courier New';"&gt;//4-4-3-3 daytime shedule&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;match&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;Mod&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;daystart&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;DayStart&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;add_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;,0,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(18)))-&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: green; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9pt; font-family: 'Courier New';"&gt;$(#vShiftCalendarStart)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;,14),'3','4','5','10','11','12','13') &lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt; ((&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;frac&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;add_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;) &amp;lt;= &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(6,30)) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;or&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt; (&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;frac&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;add_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;) &amp;gt;= &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;(18))),1,0) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 9pt; color: maroon; font-family: 'Courier New';"&gt;ShiftD&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="font-size: 9pt; color: green; font-family: 'Courier New';"&gt;//3-4-4-3 nighttime schedule&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: green; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New';"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt; Input;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;﻿But I'm getting a "Table not found" script error. Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2012 15:36:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245817#M1179040</guid>
      <dc:creator />
      <dc:date>2012-02-20T15:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Separating Date Field by Staggered Shift Schedule</title>
      <link>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245818#M1179041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to label your tables (that's a good practice in general). So if you reference an "Input" table in your last resident load, use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Input:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in front of the load statement that generates the table containing add_date (well, I can't see this field loaded in your first load, but you probably load it somewhere?).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2012 16:04:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245818#M1179041</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-02-20T16:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: Separating Date Field by Staggered Shift Schedule</title>
      <link>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245819#M1179042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; The table which has the add_date field is V_MSR. I used asterisks since there's a LOT of fields in each table. Would you have a sample load script that would work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2012 18:01:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245819#M1179042</guid>
      <dc:creator />
      <dc:date>2012-02-20T18:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: Separating Date Field by Staggered Shift Schedule</title>
      <link>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245820#M1179043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, just have a look at my example scripts i posted above?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As said, it's important that you label all tables to be able to reference them later on, e.g. in a resident load.&lt;/P&gt;&lt;P&gt;So use a &lt;/P&gt;&lt;P&gt;Input:&lt;/P&gt;&lt;P&gt;label in front of your V_MSR load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or do a preceding load instead of the resident:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="font-size: 9pt; color: green; font-family: 'Courier New';"&gt;//connect statement&lt;SPAN style="font-size: 9pt; color: blue;"&gt;OLEDB&lt;/SPAN&gt; &lt;STRONG style="font-size: 9pt; color: blue;"&gt;CONNECT&lt;/STRONG&gt; &lt;SPAN style="font-size: 9pt; color: blue;"&gt;TO&lt;/SPAN&gt; &lt;SPAN style="font-size: 9pt; color: maroon;"&gt;[Provider=SQLOLEDB.1;Persist Security Info=True;User ID=username;Initial Catalog=request_report;Data Source=source;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=workstation;Use Encryption for Data=False;Tag with column collation when possible=False]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;XPassword&lt;/SPAN&gt; &lt;SPAN style="font-size: 9pt; color: blue;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt; MCMePZVMBDZMWQNOULRB);&lt;BR /&gt;&lt;SPAN style="font-size: 9pt; color: green;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="font-size: 9pt; color: green; font-family: 'Courier New';"&gt;//Loading only FSRs, RTEs and UARs; filtering out Cancelled, Draft, Closed - No CR Required and Not Feasible.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="font-size: 9pt; color: green; font-family: 'Courier New';"&gt;&lt;STRONG style="font-size: 9pt; color: blue;"&gt;SQL&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt; SELECT update_date as "history_update_date",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; status_name as "history_status_name",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "request_id",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "app_id"&lt;BR /&gt;FROM "Request_report".dbo."V_REQUEST_HISTORY"&lt;BR /&gt;where&lt;BR /&gt;(app_id=3 or app_id=22 or app_id=63);&lt;BR /&gt;&lt;SPAN style="font-size: 9pt; color: green;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="font-size: 9pt; color: green; font-family: 'Courier New';"&gt;//Loading only FSRs, RTEs and UARs; filtering out Cancelled, Draft, Closed - No CR Required and Not Feasible.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;&lt;STRONG style="font-size: 9pt; color: blue;"&gt;Let&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM style="font-size: 9pt; color: gray;"&gt;vShiftCalendarStart&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt;"&gt; = '2/20/2011';&lt;BR /&gt;&lt;BR /&gt;RESULT:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG style="font-size: 9pt; color: blue;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt;"&gt; *,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon;"&gt;ShiftA&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;,'ShiftA ','')&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon;"&gt;ShiftB&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;,'ShiftB ','')&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon;"&gt;ShiftC&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;,'ShiftC ','')&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon;"&gt;ShiftD&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;,'ShiftD','') &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 9pt; color: maroon;"&gt;WhichShifts&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;&lt;STRONG style="font-size: 9pt; color: blue;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 9pt; color: maroon;"&gt;add_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;, &lt;SPAN style="font-size: 9pt; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;match&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;Mod&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;DayStart&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon;"&gt;add_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;,)-&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New';"&gt;&lt;STRONG&gt;&lt;EM style="font-size: 9pt; color: gray;"&gt;$(#vShiftCalendarStart)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt;"&gt;,14),'0','1','2','7','8','9','10') &lt;SPAN style="font-size: 9pt; color: blue;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;frac&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon;"&gt;add_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;) &amp;lt;= &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;(18,30)) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;frac&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon;"&gt;add_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;) &amp;gt;= &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;(6)) ,1,0) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 9pt; color: maroon;"&gt;ShiftA&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: green;"&gt;//3-4-4-3 daytime schedule&lt;SPAN style="font-size: 9pt; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;match&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;Mod&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;daystart&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;DayStart&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon;"&gt;add_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt;,0,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt;(18)))-&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="font-size: 9pt; color: green; font-family: 'Courier New';"&gt;&lt;STRONG&gt;&lt;EM style="font-size: 9pt; color: gray;"&gt;$(#vShiftCalendarStart)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt;,14),'0','1','2','6','7','8','9') &lt;SPAN style="font-size: 9pt; color: blue;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;((&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;frac&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon;"&gt;add_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;) &amp;lt;= &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;(6,30))&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;frac&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon;"&gt;add_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;) &amp;gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;(18))),1,0) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 9pt; color: maroon;"&gt;ShiftB&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: green;"&gt;//3-3-4-4 nighttime schedule&lt;SPAN style="font-size: 9pt; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;match&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;Mod&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;DayStart&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon;"&gt;add_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt;,)-&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="font-size: 9pt; color: green; font-family: 'Courier New';"&gt;&lt;STRONG&gt;&lt;EM style="font-size: 9pt; color: gray;"&gt;$(#vShiftCalendarStart)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt;,14),'3','4','5','6','11','12','13') &lt;SPAN style="font-size: 9pt; color: blue;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;frac&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon;"&gt;add_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;) &amp;lt;= &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;(18,30)) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;frac&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon;"&gt;add_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;) &amp;gt;= &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;(6)) ,1,0) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 9pt; color: maroon;"&gt;ShiftC&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: green;"&gt;//4-4-3-3 daytime shedule&lt;SPAN style="font-size: 9pt; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;match&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;Mod&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;daystart&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;DayStart&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon;"&gt;add_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt;,0,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt;(18)))-&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="font-size: 9pt; color: green; font-family: 'Courier New';"&gt;&lt;STRONG&gt;&lt;EM style="font-size: 9pt; color: gray;"&gt;$(#vShiftCalendarStart)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt;,14),'3','4','5','10','11','12','13') &lt;SPAN style="font-size: 9pt; color: blue;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;((&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;frac&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon;"&gt;add_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;) &amp;lt;= &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;(6,30)) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;frac&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: maroon;"&gt;add_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;) &amp;gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;(18))),1,0) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 9pt; color: maroon;"&gt;ShiftD&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="font-size: 9pt; color: green;"&gt;//3-4-4-3 nighttime schedule&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="font-size: 9pt; color: green; font-family: 'Courier New';"&gt;&lt;STRONG style="font-size: 9pt; color: blue;"&gt;SQL&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt; SELECT *&lt;BR /&gt;FROM "Request_report".dbo."V_MSR"&lt;BR /&gt;where&lt;BR /&gt;(app_id=3 or app_id=22 or app_id=63)&lt;BR /&gt;and&lt;BR /&gt;(status_id != 0 and status_id != 11)&lt;BR /&gt;and&lt;BR /&gt;(status_name != 'Not Feasible' and status_name != 'Closed - No CR Required');&lt;BR /&gt;&lt;SPAN style="font-size: 9pt; color: green;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="font-size: 9pt; color: green; font-family: 'Courier New';"&gt;//Mapping existing app_id table to contextual names&lt;STRONG style="font-size: 9pt; color: blue;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: blue;"&gt;INLINE&lt;/SPAN&gt; &lt;SPAN style="font-size: 9pt; color: maroon;"&gt;[&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; app_id, app_name&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3, FSR&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 22, RTE&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 63, UAR&lt;BR /&gt;]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black;"&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2012 18:06:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separating-Date-Field-by-Staggered-Shift-Schedule/m-p/245820#M1179043</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-02-20T18:06:49Z</dc:date>
    </item>
  </channel>
</rss>

