<?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: difference between 2 timestamps without weekends, except when enddate is in a weekend in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/difference-between-2-timestamps-without-weekends-except-when/m-p/1881460#M72619</link>
    <description>&lt;P&gt;I think when you reference enddate in your expression, you could round off the time if it's a weekend date. Something like:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;if(WeekDay(FirstValidatingDateTime) &amp;gt; 4, Floor(FirstValidatingDateTime), FirstValidatingDateTime)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;-Rob&lt;/P&gt;</description>
    <pubDate>Sun, 16 Jan 2022 14:41:30 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2022-01-16T14:41:30Z</dc:date>
    <item>
      <title>difference between 2 timestamps without weekends, except when enddate is in a weekend</title>
      <link>https://community.qlik.com/t5/App-Development/difference-between-2-timestamps-without-weekends-except-when/m-p/1881454#M72618</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The goal is to calculate the difference between two timestamp without weekends. The problem; when the enddate is in a weekend, the formula still substracts the full 2 days, instead of calculating the real duration from friday 00:00 till the endtime, and substracting the duration with that time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See below; the leftmost column is the correct duration, the column next to that one is what I get.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Quentinn_0-1642339519323.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/70298iAEABD59E59D4653A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Quentinn_0-1642339519323.png" alt="Quentinn_0-1642339519323.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A solution would be hugely appreciated!&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jan 2022 13:27:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/difference-between-2-timestamps-without-weekends-except-when/m-p/1881454#M72618</guid>
      <dc:creator>Quentinn</dc:creator>
      <dc:date>2022-01-16T13:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: difference between 2 timestamps without weekends, except when enddate is in a weekend</title>
      <link>https://community.qlik.com/t5/App-Development/difference-between-2-timestamps-without-weekends-except-when/m-p/1881460#M72619</link>
      <description>&lt;P&gt;I think when you reference enddate in your expression, you could round off the time if it's a weekend date. Something like:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;if(WeekDay(FirstValidatingDateTime) &amp;gt; 4, Floor(FirstValidatingDateTime), FirstValidatingDateTime)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;-Rob&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jan 2022 14:41:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/difference-between-2-timestamps-without-weekends-except-when/m-p/1881460#M72619</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2022-01-16T14:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: difference between 2 timestamps without weekends, except when enddate is in a weekend</title>
      <link>https://community.qlik.com/t5/App-Development/difference-between-2-timestamps-without-weekends-except-when/m-p/1881464#M72620</link>
      <description>&lt;P&gt;Many thanks, i'm on the right path now&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, it refuses to round off sundays, even if i specify the beginning weekday&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Quentinn_0-1642345731856.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/70299iE3037C829308D4C0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Quentinn_0-1642345731856.png" alt="Quentinn_0-1642345731856.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jan 2022 15:09:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/difference-between-2-timestamps-without-weekends-except-when/m-p/1881464#M72620</guid>
      <dc:creator>Quentinn</dc:creator>
      <dc:date>2022-01-16T15:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: difference between 2 timestamps without weekends, except when enddate is in a weekend</title>
      <link>https://community.qlik.com/t5/App-Development/difference-between-2-timestamps-without-weekends-except-when/m-p/1881465#M72621</link>
      <description>&lt;P&gt;i managed to solve that, weekday 0 is sunday and 6 is saturday for some reason, i'll see if i can make my calculations work with your input&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jan 2022 15:20:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/difference-between-2-timestamps-without-weekends-except-when/m-p/1881465#M72621</guid>
      <dc:creator>Quentinn</dc:creator>
      <dc:date>2022-01-16T15:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: difference between 2 timestamps without weekends, except when enddate is in a weekend</title>
      <link>https://community.qlik.com/t5/App-Development/difference-between-2-timestamps-without-weekends-except-when/m-p/1881467#M72622</link>
      <description>&lt;P&gt;I'm almost there!&lt;/P&gt;
&lt;P&gt;Now i'm exactly one day short so it has to do with the round in my opinion, any ideas?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Quentinn_0-1642346616491.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/70300i70BE60533A8B899B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Quentinn_0-1642346616491.png" alt="Quentinn_0-1642346616491.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jan 2022 15:24:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/difference-between-2-timestamps-without-weekends-except-when/m-p/1881467#M72622</guid>
      <dc:creator>Quentinn</dc:creator>
      <dc:date>2022-01-16T15:24:13Z</dc:date>
    </item>
  </channel>
</rss>

