<?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: Calculate hours between two Date/Time strings in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380751#M142019</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that is indeed a much simpler solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I must admit that I posted above script while working on &lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/message/251011#251011" title="http://community.qlik.com/message/251011#251011"&gt;http://community.qlik.com/message/251011&lt;/A&gt;&lt;/P&gt;&lt;P&gt;where I initially followed a similar approach than you, but the request in that thread was to include saturdays.&lt;/P&gt;&lt;P&gt;It's a pity that networkdays function does not allow to specify a different weekend pattern (and also some other functions). &lt;/P&gt;&lt;P&gt;Or have I missed something here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you're right, given the request in &lt;SPAN style="text-decoration: underline;"&gt;this&lt;/SPAN&gt; thread, we can use networkdays and I should have pointed that out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We might need to add a check for weekend/holidays on the first / last date in the period (though this case might be excluded by business rules). &lt;/P&gt;&lt;P&gt;If you apply your neat expression to my sample data, you'll see that you get different results than me for those cases, where either Closedate or Logdate (or both) are a weekend / holiday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are also getting different results for cases when both Closedate and Logdate are working days, but the logged time is outside working hours (this case may also be excluded by business rules, but I personally encountered many situations where the Logdate could happen any time).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attaching a sample file to demonstrate these cases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe we can use something like this to handle these cases (if needed):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Interval(&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;rangesum(&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NetWorkDays(DT1+1,DT2-1,$(vHol)) * MakeTime(10)&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// 10 hours per workday, for all day inbetween the period, excluding bounderies&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;,if(NetWorkDays(DT2,DT2,$(vHol)),Rangemin(rangemax(frac(DT2),maketime(8)),maketime(18))-Rangemax(rangemin(frac(DT2),maketime(8)),maketime(8)),0) // working hours last day&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;,if(NetWorkDays(DT1,DT1,$(vHol)),Rangemin(rangemax(frac(DT1),maketime(18)),maketime(18))-Rangemax(rangemin(frac(DT1),maketime(18)),maketime(8)),0) // working hours first day&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;,if(NetWorkDays(DT1,DT1,$(vHol)) and floor(DT1)=floor(DT2),-MakeTime(10)) // correct for first equals last day &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;as DurationStefan&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If these checks are not needed, I think your expression is really most simple and nice.&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, 29 Aug 2012 16:04:10 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2012-08-29T16:04:10Z</dc:date>
    <item>
      <title>Calculate hours between two Date/Time strings</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380745#M142013</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 was wondering if someone would be able to help me with this query.&amp;nbsp; I am new to Qlikview and have created a straight chart where all my information goes into.&amp;nbsp;&amp;nbsp; I have created a new column which I called &lt;STRONG&gt;Time (log-close).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In that new column I want to be able to calculate in hours, the difference between a field called &lt;STRONG&gt;closedate(which is a date/time field 01/01/2010 09:00:00) &lt;/STRONG&gt;and a field called &lt;STRONG&gt;logdate (which is also a date time field 01/01/2010 09:00:00).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;To calculate the difference I used the following expression: &lt;STRONG&gt;Interval (closedate - logdate)&lt;/STRONG&gt;, which gave me the correct hours:minutes:seconds.&amp;nbsp; &lt;/P&gt;&lt;P&gt;However our business hours are only between 08:00 - 18:00.&amp;nbsp; Therefore if we had the &lt;STRONG&gt;example 1&lt;/STRONG&gt; below, at the moment the hours would show as &lt;STRONG&gt;49:00:00.&amp;nbsp; &lt;/STRONG&gt;However as we are not interested in time before 08:00 and after 18:00, the correct time should show as &lt;STRONG&gt;20:00:00.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;To make matters more complicated we are also &lt;STRONG&gt;not&lt;/STRONG&gt; interested in weekends, therefore in &lt;STRONG&gt;example 2&lt;/STRONG&gt;, the way we currently have it the hours would show as &lt;STRONG&gt;66:00:00 &lt;/STRONG&gt;(as the dates are over the weekend), however the correct time should show as &lt;STRONG&gt;04:00:00 (as this will ignore times after 18:00 and also the whole of Saturday and Sunday)&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Is there a way this can be done?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example 1: &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Logdate &lt;/STRONG&gt;- 01/08/2012 09:00:00&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Closedate &lt;/STRONG&gt;- 03/8/2012 10:00:00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example 2:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Logdate &lt;/STRONG&gt;- 03/08/2012 15:00:00&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Closedate &lt;/STRONG&gt;- 06/08/2012 09:00:00&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 10:44:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380745#M142013</guid>
      <dc:creator />
      <dc:date>2012-08-24T10:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two Date/Time strings</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380746#M142014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your interval seems to be static, i.e. not depending on selections, so I would implement the calculation in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This could look like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Set TimestampFormat = 'M/D/YY hh:mm TT';&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Set vHol = '41130,41140';&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;INPUT:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD *, recno() as ID INLINE [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DT1, DT2&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;8/9/12 11:08 AM,8/9/12 2:57 PM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;8/18/12 09:20 AM,8/20/12 01:13 PM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;8/17/12 09:20 AM,8/20/12 01:13 PM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;8/17/12 09:20 AM,8/19/12 01:13 PM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;6/27/12 12:41 PM,&amp;nbsp;&amp;nbsp;&amp;nbsp; 7/6/12 4:38 PM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;6/29/12 4:45 PM,&amp;nbsp;&amp;nbsp;&amp;nbsp; 7/6/12 4:19 PM&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;8/1/12 09:00 AM, 8/3/12 10:00 AM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;8/3/12 03:00 PM, 8/6/12 09:00 AM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;TMP:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD&amp;nbsp; ID,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;daystart(DT1)+iterno()-1 as Date,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(iterno()=1, rangemin(rangemax(frac(DT1),maketime(8)),maketime(18)), maketime(8)) as Start,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(daystart(DT1)+iterno()-1=daystart(DT2), rangemax(maketime(8),rangemin(frac(DT2),maketime(18))),Maketime(18)) as End&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident INPUT&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;while daystart(DT2) &amp;gt;= daystart(DT1)+iterno()-1;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;left join (INPUT) &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ID, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;interval(sum(End-Start)) as Duration&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident TMP&amp;nbsp; where WeekDay(Date)&amp;lt;5 and not match(Date,$(vHol))&amp;nbsp;&amp;nbsp; group by ID; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;drop table TMP;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition to the weekends, you can also exclude holidays from the interval calculation, by adding your holidays to the vHol variable (you can create this variable from a holiday table, there are some posts here on how to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then create a record per date in each interval and assign the start and end times per date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, just sum up all per-date-intervals and you're done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to adjust the timestamp format to your format used, check the format codes in the Help if needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 11:59:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380746#M142014</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-08-24T11:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two Date/Time strings</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380747#M142015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This seems to work perfectly.&amp;nbsp; I ran the data you entered and put it on a test qlikview documents, however the only time that didnt calculate was:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;8/9/12 11:08 AM,8/9/12 2:57 PM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;For some reason this doesn't show a time at all, yet it is not a holiday.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Regards,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Jon&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 08:56:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380747#M142015</guid>
      <dc:creator />
      <dc:date>2012-08-28T08:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two Date/Time strings</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380748#M142016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The numerical representation of that date is 41130, and I have included that date to the vHol variable, for testing.&lt;/P&gt;&lt;P&gt;Might also be a holiday somewhere in the world.&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>Tue, 28 Aug 2012 11:16:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380748#M142016</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-08-28T11:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two Date/Time strings</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380749#M142017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the information.&amp;nbsp; I have just tried to set this up so it brings through the logdate and closedate from SQL.&amp;nbsp; I am assuming that it pulls through a field called Duration, however this Duration field does not have any information in it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 13:17:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380749#M142017</guid>
      <dc:creator />
      <dc:date>2012-08-28T13:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two Date/Time strings</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380750#M142018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I like your script but it seems a simpler solution may be the single expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;=Interval(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RangeMin(frac(Closedate), MakeTime(18)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - RangeMax(frac(Logdate), MakeTime(8)))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + (NetWorkDays(Logdate, Closedate-1) * MakeTime(10)) // Only 10 hours per whole day&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Works in both charts and script. NetWorkDays() optionally supports holidays as well. I haven't extensively tested this but it seems right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 18:17:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380750#M142018</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2012-08-28T18:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two Date/Time strings</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380751#M142019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that is indeed a much simpler solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I must admit that I posted above script while working on &lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/message/251011#251011" title="http://community.qlik.com/message/251011#251011"&gt;http://community.qlik.com/message/251011&lt;/A&gt;&lt;/P&gt;&lt;P&gt;where I initially followed a similar approach than you, but the request in that thread was to include saturdays.&lt;/P&gt;&lt;P&gt;It's a pity that networkdays function does not allow to specify a different weekend pattern (and also some other functions). &lt;/P&gt;&lt;P&gt;Or have I missed something here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you're right, given the request in &lt;SPAN style="text-decoration: underline;"&gt;this&lt;/SPAN&gt; thread, we can use networkdays and I should have pointed that out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We might need to add a check for weekend/holidays on the first / last date in the period (though this case might be excluded by business rules). &lt;/P&gt;&lt;P&gt;If you apply your neat expression to my sample data, you'll see that you get different results than me for those cases, where either Closedate or Logdate (or both) are a weekend / holiday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are also getting different results for cases when both Closedate and Logdate are working days, but the logged time is outside working hours (this case may also be excluded by business rules, but I personally encountered many situations where the Logdate could happen any time).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attaching a sample file to demonstrate these cases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe we can use something like this to handle these cases (if needed):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Interval(&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;rangesum(&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NetWorkDays(DT1+1,DT2-1,$(vHol)) * MakeTime(10)&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// 10 hours per workday, for all day inbetween the period, excluding bounderies&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;,if(NetWorkDays(DT2,DT2,$(vHol)),Rangemin(rangemax(frac(DT2),maketime(8)),maketime(18))-Rangemax(rangemin(frac(DT2),maketime(8)),maketime(8)),0) // working hours last day&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;,if(NetWorkDays(DT1,DT1,$(vHol)),Rangemin(rangemax(frac(DT1),maketime(18)),maketime(18))-Rangemax(rangemin(frac(DT1),maketime(18)),maketime(8)),0) // working hours first day&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;,if(NetWorkDays(DT1,DT1,$(vHol)) and floor(DT1)=floor(DT2),-MakeTime(10)) // correct for first equals last day &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;as DurationStefan&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If these checks are not needed, I think your expression is really most simple and nice.&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, 29 Aug 2012 16:04:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380751#M142019</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-08-29T16:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two Date/Time strings</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380752#M142020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you read in your timestamps, you need to ensure that QV interpretes these values as such. Your timestamps in QV must have a numerical representation to make all these suggested expressions / scripts work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That means, if you are using num(Closedate), that must return a numerical.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To help QV with interpreting your timestamps, you can use&lt;EM&gt; timestamp#(FIELD, FORMATCODESTRING)&lt;/EM&gt; function when reading in from DB. Please check the format codes in the Help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or just set the format code used as standard timestamp format:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe use this in your script (I am using the format of your OP):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Set TimestampFormat = 'DD/MM/YYYY hh:mm:ss';&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 16:10:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380752#M142020</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-08-29T16:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two Date/Time strings</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380753#M142021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for identifying the limitations of my solution. It was a bit simplistic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 17:49:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380753#M142021</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2012-08-29T17:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two Date/Time strings</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380754#M142022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help on this one Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 09:06:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380754#M142022</guid>
      <dc:creator />
      <dc:date>2012-08-30T09:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two Date/Time strings</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380755#M142023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for you help on this one Rob.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 09:07:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380755#M142023</guid>
      <dc:creator />
      <dc:date>2012-08-30T09:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two Date/Time strings</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380756#M142024</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;How can i adapt this script adding a interval to lunch in 12:00 for 13:00?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Interval(&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;rangesum(&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NetWorkDays(DT1+1,DT2-1,$(vHol)) * MakeTime(10)&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// 10 hours per workday, for all day inbetween the period, excluding bounderies&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;,if(NetWorkDays(DT2,DT2,$(vHol)),Rangemin(rangemax(frac(DT2),maketime(8)),maketime(18))-Rangemax(rangemin(frac(DT2),maketime(8)),maketime(8)),0) // working hours last day&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;,if(NetWorkDays(DT1,DT1,$(vHol)),Rangemin(rangemax(frac(DT1),maketime(18)),maketime(18))-Rangemax(rangemin(frac(DT1),maketime(18)),maketime(8)),0) // working hours first day&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;,if(NetWorkDays(DT1,DT1,$(vHol)) and floor(DT1)=floor(DT2),-MakeTime(10)) // correct for first equals last day &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;as DurationStefan&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 22:21:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380756#M142024</guid>
      <dc:creator />
      <dc:date>2014-07-02T22:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two Date/Time strings</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380757#M142025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like in this post:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/message/272111"&gt;Re: Expression with Working Days and working Hours&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Jul 2014 16:56:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380757#M142025</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2014-07-06T16:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two Date/Time strings</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380758#M142026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tkanks for your answer!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used this script like below, but it have a some problem.&lt;/P&gt;&lt;P&gt;In case de dates are for example DT1 28/05/2014 08:49:18&amp;nbsp;&amp;nbsp;&amp;nbsp; DT2 28/05/2014 09:09:09 the answer is 01:19:51 instead 19:51. Any idea?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interval(&lt;/P&gt;&lt;P&gt;rangesum(&lt;/P&gt;&lt;P&gt;NetWorkDays(DT1+1,DT2-1,$(vHol)) * MakeTime(9)&amp;nbsp; //8 hours per workday, for all day inbetween the period, excluding bounderies&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,if(NetWorkDays(DT2,DT2,$(vHol)), Rangemin(rangemax(frac(DT2),maketime(13)),maketime(18))-Rangemax(rangemin(frac(DT2),maketime(13)),maketime(13))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;+Rangemin(rangemax(frac(DT2),maketime(8)),maketime(12))-Rangemax(rangemin(frac(DT2),maketime(8)),maketime(8)),0) // working hours last day&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,if(NetWorkDays(DT1,DT1,$(vHol)),Rangemin(rangemax(frac(DT1),maketime(18)),maketime(18))-Rangemax(rangemin(frac(DT1),maketime(18)),maketime(12))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;+Rangemin(rangemax(frac(DT1),maketime(12)),maketime(12))-Rangemax(rangemin(frac(DT1),maketime(12)),maketime(8)),0) // working first day&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,if(NetWorkDays(DT1,DT1,$(vHol)) and floor(DT1)=floor(DT2),-MakeTime(9)) // correct for first equals last day &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jul 2014 16:45:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380758#M142026</guid>
      <dc:creator />
      <dc:date>2014-07-07T16:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two Date/Time strings</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380759#M142027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a small error in the calculation of working hours first day:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interval(&lt;/P&gt;&lt;P&gt;rangesum(&lt;/P&gt;&lt;P&gt;NetWorkDays(DT1+1,DT2-1,$(vHol)) * MakeTime(9)&amp;nbsp; //9 hours per workday, for all day inbetween the period, excluding bounderies&lt;/P&gt;&lt;P&gt; ,if(NetWorkDays(DT2,DT2,$(vHol)), Rangemin(rangemax(frac(DT2),maketime(13)),maketime(18))-Rangemax(rangemin(frac(DT2),maketime(13)),maketime(13))&lt;/P&gt;&lt;P&gt; +Rangemin(rangemax(frac(DT2),maketime(8)),maketime(12))-Rangemax(rangemin(frac(DT2),maketime(8)),maketime(8)),0) // working hours last day&lt;/P&gt;&lt;P&gt; ,if(NetWorkDays(DT1,DT1,$(vHol)),Rangemin(rangemax(frac(DT1),maketime(18)),maketime(18))-Rangemax(rangemin(frac(DT1),maketime(18)),maketime(&lt;STRONG&gt;&lt;EM&gt;13&lt;/EM&gt;&lt;/STRONG&gt;))&lt;/P&gt;&lt;P&gt; +Rangemin(rangemax(frac(DT1),maketime(12)),maketime(12))-Rangemax(rangemin(frac(DT1),maketime(12)),maketime(8)),0) // working first day&lt;/P&gt;&lt;P&gt; ,if(NetWorkDays(DT1,DT1,$(vHol)) and floor(DT1)=floor(DT2),-MakeTime(9)) // correct for first equals last day&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;)) as DurationBreak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2014 17:38:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380759#M142027</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2014-07-11T17:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two Date/Time strings</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380760#M142028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INPUT:&lt;/P&gt;&lt;P&gt;LOAD *, recno() as ID INLINE [&lt;/P&gt;&lt;P&gt;DT1, DT2&lt;/P&gt;&lt;P&gt;8/9/12 11:08 AM,8/9/12 2:57 PM&lt;/P&gt;&lt;P&gt;8/18/12 09:20 AM,8/20/12 01:13 PM&lt;/P&gt;&lt;P&gt;8/17/12 09:20 AM,8/20/12 01:13 PM&lt;/P&gt;&lt;P&gt;8/17/12 09:20 AM,8/19/12 01:13 PM&lt;/P&gt;&lt;P&gt;6/27/12 12:41 PM,7/6/12 4:38 PM&lt;/P&gt;&lt;P&gt;6/29/12 4:45 PM, 7/6/12 4:19 PM&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;8/1/12 09:00 AM, 8/3/12 10:00 AM&lt;/P&gt;&lt;P&gt;8/3/12 03:00 PM, 8/6/12 09:00 AM&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TMP:&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; ID,&lt;/P&gt;&lt;P&gt;daystart(DT1)+iterno()-1 as Date,&lt;/P&gt;&lt;P&gt;if(iterno()=1, rangemin(rangemax(frac(DT1),maketime(8)),maketime(18)), maketime(8)) as Start,&lt;/P&gt;&lt;P&gt;if(daystart(DT1)+iterno()-1=daystart(DT2), rangemax(maketime(8),rangemin(frac(DT2),maketime(18))),Maketime(18)) as End&lt;/P&gt;&lt;P&gt;Resident INPUT&lt;/P&gt;&lt;P&gt;while daystart(DT2) &amp;gt;= daystart(DT1)+iterno()-1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join (INPUT)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;ID,&lt;/P&gt;&lt;P&gt;interval(sum(End-Start)) as Duration&lt;/P&gt;&lt;P&gt;Resident TMP&amp;nbsp; where WeekDay(Date)&amp;lt;5 and not match(Date,$(vHol))&amp;nbsp;&amp;nbsp; group by ID;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 12:12:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380760#M142028</guid>
      <dc:creator />
      <dc:date>2014-09-09T12:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two Date/Time strings</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380761#M142029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the near about the same requirement.&lt;/P&gt;&lt;P&gt;I have gone through your suggestion but i am not able to implement. I am very sorry.&lt;/P&gt;&lt;P&gt;Can you help me on that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 10:47:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380761#M142029</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-25T10:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two Date/Time strings</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380762#M142030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your Solution (the one without Lunch Breaks) works well but I have a small bug that I cannot seem to solve. The working hours is 08:00 to 17:00 so it works with most but I have for example a ticket that came in 17:11 and closed 17:28. It shows a 01:00 in my results. I have pulled apart the calc but it still does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea? attached is the script snippt and a screenshot of the timestamp and results&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Interval&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;rangesum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;NetWorkDays&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TicketSubmittedDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;+1,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TicketAcceptedDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;-1,&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vHol)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;) * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;MakeTime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(8)&amp;nbsp; &lt;BR /&gt; ,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;NetWorkDays&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TicketAcceptedDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TicketAcceptedDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vHol)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Rangemin&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;rangemax&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;frac&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TicketAcceptedDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(8)),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(17))-&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Rangemax&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;rangemin&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;frac&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TicketAcceptedDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(8)),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(8)),0) &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;// working hours last day&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;NetWorkDays&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TicketSubmittedDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TicketSubmittedDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vHol)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Rangemin&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;rangemax&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;frac&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TicketSubmittedDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(17)),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(17))-&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Rangemax&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;rangemin&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;frac&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TicketSubmittedDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(17)),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(8)),0) &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;// working hours first day&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;NetWorkDays&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TicketSubmittedDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TicketSubmittedDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vHol)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;floor&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TicketSubmittedDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;floor&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TicketAcceptedDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),-&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;MakeTime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(8)) &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;// correct for first equals last day &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ResponseTime &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/100575_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2015 07:08:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380762#M142030</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-01T07:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two Date/Time strings</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380763#M142031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;8:00 to 17:00 are 9 hours, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;Interval&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;rangesum&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;NetWorkDays&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;TicketSubmittedDate&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;+1,&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;TicketAcceptedDate&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;-1,&lt;/SPAN&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;EM style="font-weight: inherit; font-size: 8pt; font-family: inherit; color: #808080;"&gt;$(vHol)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;) * &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;MakeTime&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;SPAN style="font-size: 14pt;"&gt;9&lt;/SPAN&gt;)&amp;nbsp; &lt;BR /&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;NetWorkDays&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;TicketAcceptedDate&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;TicketAcceptedDate&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;EM style="font-weight: inherit; font-size: 8pt; font-family: inherit; color: #808080;"&gt;$(vHol)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;Rangemin&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;rangemax&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;frac&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;TicketAcceptedDate&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(8)),&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(17))-&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;Rangemax&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;rangemin&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;frac&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;TicketAcceptedDate&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(8)),&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(8)),0) &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #008000;"&gt;// working hours last day&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;NetWorkDays&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;TicketSubmittedDate&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;TicketSubmittedDate&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;EM style="font-weight: inherit; font-size: 8pt; font-family: inherit; color: #808080;"&gt;$(vHol)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;Rangemin&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;rangemax&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;frac&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;TicketSubmittedDate&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(17)),&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(17))-&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;Rangemax&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;rangemin&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;frac&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;TicketSubmittedDate&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(17)),&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;maketime&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(8)),0) &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #008000;"&gt;// working hours first day&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;NetWorkDays&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;TicketSubmittedDate&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;TicketSubmittedDate&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;EM style="font-weight: inherit; font-size: 8pt; font-family: inherit; color: #808080;"&gt;$(vHol)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;floor&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;TicketSubmittedDate&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;)=&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;floor&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;TicketAcceptedDate&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;),-&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;MakeTime&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;SPAN style="font-size: 14pt;"&gt;9&lt;/SPAN&gt;)) &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #008000;"&gt;// correct for first equals last day &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;)) &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;ResponseTime&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2015 13:57:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380763#M142031</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-10-01T13:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two Date/Time strings</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380764#M142032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Jonathan ,&lt;/P&gt;&lt;P&gt;we are facing similar kind of format text but want us a 24 hours with excluding weekends&amp;nbsp; instead of working hours.&lt;/P&gt;&lt;P&gt;please help me&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2016 11:08:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-Date-Time-strings/m-p/380764#M142032</guid>
      <dc:creator>sunilkumarqv</dc:creator>
      <dc:date>2016-03-18T11:08:58Z</dc:date>
    </item>
  </channel>
</rss>

