<?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: Duration format cuts seconds in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Duration-format-cuts-seconds/m-p/1800164#M64821</link>
    <description>&lt;P&gt;Thank you for you replies,&amp;nbsp;&lt;/P&gt;&lt;P&gt;my business requirement is just to show hours and minutes, not seconds.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have thought about rounding the expression like &lt;STRONG&gt;round(expr,1/1440*(100/60)))&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;where 1/1440 stand for minute and then I realised it should be accounted for decimal system when rounding, therefore multiplication with &lt;STRONG&gt;100/60&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;But that would not work if I have two measures in the diagramm like &lt;STRONG&gt;sum({&amp;lt;Type = {'A'}&amp;gt;} Duration&lt;/STRONG&gt;) and&amp;nbsp; &lt;STRONG&gt;sum({&amp;lt;Type = {'B'}&amp;gt;} Duration)&lt;/STRONG&gt;, because they would be rounded separately and therefore their sum would not match to the KPI Object&amp;nbsp;&lt;STRONG&gt;sum({&amp;lt;Type = {'A', 'B'}&amp;gt;} Duration&lt;/STRONG&gt;).&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I still have no solution hier, if the requirement is to show only hours and minutes, I kind of have to round the sum of measure A and B in the diagramm, not each measure separately so the sum matches the KPI, but it seems not possible to me...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Apr 2021 15:27:36 GMT</pubDate>
    <dc:creator>Eddy</dc:creator>
    <dc:date>2021-04-16T15:27:36Z</dc:date>
    <item>
      <title>Duration format cuts seconds</title>
      <link>https://community.qlik.com/t5/App-Development/Duration-format-cuts-seconds/m-p/1799996#M64800</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I observe following behaviour in Qlik:&amp;nbsp;&lt;/P&gt;&lt;P&gt;My measures are durations, formatted as numeric in script. I want to show them in line diagramm and format as duration with hours and minutes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I observe that&lt;STRONG&gt; when fomat the measures as duration in format h:mm the seconds are just cut off&lt;/STRONG&gt;&lt;U&gt;,&lt;/U&gt; so when 2 min 59 Sec ist formatted as 2 min.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think a possible solution could be to format the measure as&amp;nbsp;&lt;STRONG&gt;round(sum(Duration), 1/1440)&lt;/STRONG&gt;, 1/1440 is the step of the round function, represents a minute (24*60)&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Is it the standard Qlik bevahiour to just cut off seconds when format &lt;STRONG&gt;duration&amp;nbsp;&lt;/STRONG&gt; and &lt;STRONG&gt;h:mm&amp;nbsp;&lt;/STRONG&gt;is set?&lt;/LI&gt;&lt;LI&gt;Is there some standard formatting setting which would not cut seconds, if I do not want to use the round function?&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Find the qvf attached.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Duration format.png" style="width: 810px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/53141i4FA368221FF48078/image-dimensions/810x235?v=v2" width="810" height="235" role="button" title="Duration format.png" alt="Duration format.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 21:56:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Duration-format-cuts-seconds/m-p/1799996#M64800</guid>
      <dc:creator>Eddy</dc:creator>
      <dc:date>2021-12-21T21:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Duration format cuts seconds</title>
      <link>https://community.qlik.com/t5/App-Development/Duration-format-cuts-seconds/m-p/1800127#M64815</link>
      <description>&lt;P&gt;Use 'hh:mm:ss' as your format.&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 13:51:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Duration-format-cuts-seconds/m-p/1800127#M64815</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2021-04-16T13:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Duration format cuts seconds</title>
      <link>https://community.qlik.com/t5/App-Development/Duration-format-cuts-seconds/m-p/1800155#M64820</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/83794"&gt;@Eddy&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Take into account when you format, you are showing part of the different time components, not doing any mathematical operations like rounding. Rounding could be good for you, but not for others, I explain: imaging I want to round months, so above day 15th of any month you will see the next month, as of today (2021/04/16) you will see month May. This is not a standard, is just my business rule.&lt;/P&gt;&lt;P&gt;If you want to round the seconds before showing a duration in minutes, this is your business rule and you should implement in your calculations, for example with a Round() mathematical function before a TimeStamp() string conversion function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;JG&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 14:59:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Duration-format-cuts-seconds/m-p/1800155#M64820</guid>
      <dc:creator>JuanGerardo</dc:creator>
      <dc:date>2021-04-16T14:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: Duration format cuts seconds</title>
      <link>https://community.qlik.com/t5/App-Development/Duration-format-cuts-seconds/m-p/1800164#M64821</link>
      <description>&lt;P&gt;Thank you for you replies,&amp;nbsp;&lt;/P&gt;&lt;P&gt;my business requirement is just to show hours and minutes, not seconds.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have thought about rounding the expression like &lt;STRONG&gt;round(expr,1/1440*(100/60)))&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;where 1/1440 stand for minute and then I realised it should be accounted for decimal system when rounding, therefore multiplication with &lt;STRONG&gt;100/60&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;But that would not work if I have two measures in the diagramm like &lt;STRONG&gt;sum({&amp;lt;Type = {'A'}&amp;gt;} Duration&lt;/STRONG&gt;) and&amp;nbsp; &lt;STRONG&gt;sum({&amp;lt;Type = {'B'}&amp;gt;} Duration)&lt;/STRONG&gt;, because they would be rounded separately and therefore their sum would not match to the KPI Object&amp;nbsp;&lt;STRONG&gt;sum({&amp;lt;Type = {'A', 'B'}&amp;gt;} Duration&lt;/STRONG&gt;).&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I still have no solution hier, if the requirement is to show only hours and minutes, I kind of have to round the sum of measure A and B in the diagramm, not each measure separately so the sum matches the KPI, but it seems not possible to me...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 15:27:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Duration-format-cuts-seconds/m-p/1800164#M64821</guid>
      <dc:creator>Eddy</dc:creator>
      <dc:date>2021-04-16T15:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Duration format cuts seconds</title>
      <link>https://community.qlik.com/t5/App-Development/Duration-format-cuts-seconds/m-p/1800210#M64830</link>
      <description>&lt;P&gt;Then, you can check if your expr has a second component greater than 29, and in that case add one second to your expression:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Date(expr + If(Second(expr) &amp;gt; 29, MakeTime(0, 0, 1), 0), 'hh:mm')&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;or if you don't want to use the If() statement, like me, you can use some maths: (24 * 60 * 60 = 86400 seconds/day)&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Date(expr + Floor(Second(expr) / 30) / 86400, 'hh:mm')&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;JG&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 19:03:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Duration-format-cuts-seconds/m-p/1800210#M64830</guid>
      <dc:creator>JuanGerardo</dc:creator>
      <dc:date>2021-04-16T19:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: Duration format cuts seconds</title>
      <link>https://community.qlik.com/t5/App-Development/Duration-format-cuts-seconds/m-p/1802132#M65072</link>
      <description>&lt;P&gt;Ok, I got, it. So the formatting as duration [h:mm] just shows hours and minutes and disregards seconds, so no automatical rounding here. Here I attached a screenshot, which shows that. Nevertheless, there seems to be a scaling problem when using the format duration [h:mm], left bar chart on the screenshot, and can be seen in the attached qvf.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the explanation. JuanGerardo.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Scaling.jpg" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/53554i689E47914C35019B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Scaling.jpg" alt="Scaling.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 11:47:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Duration-format-cuts-seconds/m-p/1802132#M65072</guid>
      <dc:creator>Eddy</dc:creator>
      <dc:date>2021-04-23T11:47:51Z</dc:date>
    </item>
  </channel>
</rss>

