<?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 Working hours calculation + 24 hours in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Working-hours-calculation-24-hours/m-p/87643#M14302</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have data like&lt;/P&gt;&lt;P&gt;Activity ID, Activity Start Date, Activity End Date&lt;/P&gt;&lt;P&gt;1, 25-06-2018 10:00:00, 26-06-2018 11:00:00&lt;/P&gt;&lt;P&gt;2, 23-06-2018 11:12:00, 25-06-2018 12:00:00&lt;/P&gt;&lt;P&gt;3, 22-06-2018 10:00:00, 25-06-2018 15:00:00&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The requirement is,&lt;/P&gt;&lt;P&gt;I should consider the duration or working hours like &lt;/P&gt;&lt;P&gt;for weekdays, 24 hours&lt;/P&gt;&lt;P&gt;for week ends, only business working hours&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only for few countries, they work on weekends but for other countries they work only on weekdays.&lt;/P&gt;&lt;P&gt;For example, for the Activity ID 1, the Start date is 25-06-2018 10:00:00, so the time starts and should consider the entire day (The time left for the day is 14 hours). the end date is 26-06-2018 11:00:00 (11 hours), so the duration of SLA is 14 hours + 11 hours = 25 hours.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for the Activity ID 3, the start date is 22-06-2018 10:00:00 (14 hours left for the day), then there are two days in between as weekends (9+9), then it is solved on 25-06-2016 12:00:00 (12 hours), so Duration = 14 + 9 + 9 + 12 = 44 hours.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should consider the 24 hours in weekdays and working hours 9 to 6pm on weekends.&lt;/P&gt;&lt;P&gt;So how can we calculate this in the QlikView script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Jun 2018 14:07:13 GMT</pubDate>
    <dc:creator>udaya_kumar</dc:creator>
    <dc:date>2018-06-27T14:07:13Z</dc:date>
    <item>
      <title>Working hours calculation + 24 hours</title>
      <link>https://community.qlik.com/t5/QlikView/Working-hours-calculation-24-hours/m-p/87643#M14302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have data like&lt;/P&gt;&lt;P&gt;Activity ID, Activity Start Date, Activity End Date&lt;/P&gt;&lt;P&gt;1, 25-06-2018 10:00:00, 26-06-2018 11:00:00&lt;/P&gt;&lt;P&gt;2, 23-06-2018 11:12:00, 25-06-2018 12:00:00&lt;/P&gt;&lt;P&gt;3, 22-06-2018 10:00:00, 25-06-2018 15:00:00&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The requirement is,&lt;/P&gt;&lt;P&gt;I should consider the duration or working hours like &lt;/P&gt;&lt;P&gt;for weekdays, 24 hours&lt;/P&gt;&lt;P&gt;for week ends, only business working hours&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only for few countries, they work on weekends but for other countries they work only on weekdays.&lt;/P&gt;&lt;P&gt;For example, for the Activity ID 1, the Start date is 25-06-2018 10:00:00, so the time starts and should consider the entire day (The time left for the day is 14 hours). the end date is 26-06-2018 11:00:00 (11 hours), so the duration of SLA is 14 hours + 11 hours = 25 hours.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for the Activity ID 3, the start date is 22-06-2018 10:00:00 (14 hours left for the day), then there are two days in between as weekends (9+9), then it is solved on 25-06-2016 12:00:00 (12 hours), so Duration = 14 + 9 + 9 + 12 = 44 hours.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should consider the 24 hours in weekdays and working hours 9 to 6pm on weekends.&lt;/P&gt;&lt;P&gt;So how can we calculate this in the QlikView script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2018 14:07:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Working-hours-calculation-24-hours/m-p/87643#M14302</guid>
      <dc:creator>udaya_kumar</dc:creator>
      <dc:date>2018-06-27T14:07:13Z</dc:date>
    </item>
  </channel>
</rss>

