<?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: Move Date to previous Work day in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Move-Date-to-previous-Work-day/m-p/1820062#M67229</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22949"&gt;@tresB&lt;/a&gt;&amp;nbsp;. Apologies - the 4 was from one of the tests I was doing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Changing the LET to SET did the trick! &lt;span class="lia-unicode-emoji" title=":unamused_face:"&gt;😒&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you is works perfectly..&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 06 Jul 2021 10:50:52 GMT</pubDate>
    <dc:creator>johngouws</dc:creator>
    <dc:date>2021-07-06T10:50:52Z</dc:date>
    <item>
      <title>Move Date to previous Work day</title>
      <link>https://community.qlik.com/t5/App-Development/Move-Date-to-previous-Work-day/m-p/1819651#M67194</link>
      <description>&lt;P&gt;Good Morning.&lt;BR /&gt;There is a operation that has a production cycle that runs for a day, 8am to 5pm. The outcome, how many of which items that were produced, only gets captured the next WORK day.&lt;BR /&gt;Friday's production numbers get captured on Monday etc. The normal procedure is to simply select the actual production date of when production took place.&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the implementation of a new system this can also be done, BUT, with the new system it is found that one cannot capture to another period. That means production over month end is a problem. Production for 2021-06-30 could not be captured on 2021-07-01.&lt;/P&gt;&lt;P&gt;I would like to overcome the problem in my script. I am already using Networkdays and vPublicHolidays in a Qlik Sales App, in Objects, and would like to find out if I could 'move' the production date to the actual production date by using Networkdays and vPublicHolidays in the script?&lt;/P&gt;&lt;P&gt;With other words, today is Monday. When Admin get to the office today they capture Fridays production numbers under today's date. In my loadscript I 'move' the date to the previous work day. In this case I would move the date from 2021-07-05 to 2021-07-02. If Friday was a holiday it would move the date to 2021-07-01.&lt;/P&gt;&lt;P&gt;I currently list the public holidays as below.&lt;BR /&gt;LET vPublic_Holidays = "'2020-01-01', '2020-03-21', '2020-04-10', '2020-04-13', '2020-04-27', '2020-05-01', '2020-06-16', '2020-08-10', '2020-09-24', '2020-12-16', '2020-12-25', '2020-12-26',&lt;BR /&gt;'2021-01-01', '2021-03-21', '2021-04-02', '2021-04-05', '2021-04-27', '2021-05-01', '2021-06-16', '2021-08-09', '2021-09-24', '2021-12-16', '2021-12-25', '2021-12-26'";&lt;/P&gt;&lt;P&gt;And the production data come from a QVD where I have&lt;/P&gt;&lt;P&gt;PROD:&lt;BR /&gt;Load&lt;BR /&gt;*,&lt;BR /&gt;NetWorkDays(MonthStart([Date]),MonthEnd([Date]),$(vPublic_Holidays)) as ActualDays,&lt;BR /&gt;NetWorkDays(MonthStart([Date]),MonthEnd([Date])) as [Working Days]&lt;BR /&gt;FROM [C:\Qlik\Data\Production\Prod.QVD];&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;** In this case ActualDays and Working Days returns the same result - I also tried**&lt;BR /&gt;// NetWorkDays(Date#(MonthStart([DDate]), 'YYYY-MM-DD'), Date#(MonthEnd([DDate]), 'YYYY-MM-DD'),$(vPublic_Holidays)) as ActualDays,&lt;BR /&gt;// NetWorkDays(Date#(MonthStart([DDate]), 'YYYY-MM-DD'), Date#(MonthEnd([DDate]), 'YYYY-MM-DD')) as [Working Days]&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Networkdays.PNG" style="width: 282px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/57968iA00DE43D944DE6AE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Networkdays.PNG" alt="Networkdays.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;SPAN&gt;I would really appreciate any assistance with this - Thank you - Stay safe..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jul 2021 04:20:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Move-Date-to-previous-Work-day/m-p/1819651#M67194</guid>
      <dc:creator>johngouws</dc:creator>
      <dc:date>2021-07-05T04:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: Move Date to previous Work day</title>
      <link>https://community.qlik.com/t5/App-Development/Move-Date-to-previous-Work-day/m-p/1819653#M67195</link>
      <description>&lt;P&gt;May be using &lt;A href="https://help.qlik.com/en-US/qlikview/May2021/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/firstworkdate.htm" target="_self"&gt;FirstWorkDate()&lt;/A&gt; (or, lastworkdate()).&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jul 2021 05:05:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Move-Date-to-previous-Work-day/m-p/1819653#M67195</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2021-07-05T05:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Move Date to previous Work day</title>
      <link>https://community.qlik.com/t5/App-Development/Move-Date-to-previous-Work-day/m-p/1819668#M67200</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22949"&gt;@tresB&lt;/a&gt;&amp;nbsp;, I am going to give it a try during the days and will give feedback.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":crossed_fingers:"&gt;🤞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jul 2021 06:29:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Move-Date-to-previous-Work-day/m-p/1819668#M67200</guid>
      <dc:creator>johngouws</dc:creator>
      <dc:date>2021-07-05T06:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: Move Date to previous Work day</title>
      <link>https://community.qlik.com/t5/App-Development/Move-Date-to-previous-Work-day/m-p/1819771#M67209</link>
      <description>&lt;P&gt;I have tried a few options using FirstWorkDate() but unfortunately cannot succeed. I am including a qvf with a few notes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* NOTE Friday Monday Wednesday */&lt;BR /&gt;LET vPublic_Holidays = "'2021-04-02','2021-04-05', '2021-06-16'";&lt;/P&gt;&lt;P&gt;t1:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Date, shouldshow&lt;BR /&gt;2021-04-06, 2021-04-01&lt;BR /&gt;2021-06-17, 2021-06-15&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;shouldshow are the dates I am expecting to return.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jul 2021 11:48:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Move-Date-to-previous-Work-day/m-p/1819771#M67209</guid>
      <dc:creator>johngouws</dc:creator>
      <dc:date>2021-07-05T11:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: Move Date to previous Work day</title>
      <link>https://community.qlik.com/t5/App-Development/Move-Date-to-previous-Work-day/m-p/1819995#M67224</link>
      <description>&lt;P&gt;I don't know why you are using 4 as second parameter to the function, for previous working date, you should use 2 with this function. Also, note the holiday defining variable, try with SET instead, like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;SET vPublic_Holidays = '2021-04-02','2021-04-05', '2021-06-16';&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;t1:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOAD * INLINE [&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Date, shouldshow&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;2021-04-06, 2021-04-01&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;2021-06-17, 2021-06-15&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;];&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Load &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;*,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;firstworkdate ([Date], 2,$(vPublic_Holidays)) as NewDate&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 08:00:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Move-Date-to-previous-Work-day/m-p/1819995#M67224</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2021-07-06T08:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: Move Date to previous Work day</title>
      <link>https://community.qlik.com/t5/App-Development/Move-Date-to-previous-Work-day/m-p/1820062#M67229</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22949"&gt;@tresB&lt;/a&gt;&amp;nbsp;. Apologies - the 4 was from one of the tests I was doing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Changing the LET to SET did the trick! &lt;span class="lia-unicode-emoji" title=":unamused_face:"&gt;😒&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you is works perfectly..&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 10:50:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Move-Date-to-previous-Work-day/m-p/1820062#M67229</guid>
      <dc:creator>johngouws</dc:creator>
      <dc:date>2021-07-06T10:50:52Z</dc:date>
    </item>
  </channel>
</rss>

