<?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 Problem with hours and minutes in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-hours-and-minutes/m-p/1027058#M347023</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello to all,&lt;/P&gt;&lt;P&gt;In the load script, attached example, I have to calculate the values of days, &lt;/P&gt;&lt;P&gt;hours and minutes from a field (h1) in hh,mm format.&lt;/P&gt;&lt;P&gt;For example, 204.45 are 204 hours and 45 minutes.&lt;/P&gt;&lt;P&gt;I turn around in minutes (see field min20) and after turn into days with the div function and create the g20 field. One business day corresponds to 455 minutes. In my example should give 12285/455 27 whereas in QLV get 26.&lt;/P&gt;&lt;P&gt;Why is this happening?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Feb 2016 12:30:54 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-02-25T12:30:54Z</dc:date>
    <item>
      <title>Problem with hours and minutes</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-hours-and-minutes/m-p/1027058#M347023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello to all,&lt;/P&gt;&lt;P&gt;In the load script, attached example, I have to calculate the values of days, &lt;/P&gt;&lt;P&gt;hours and minutes from a field (h1) in hh,mm format.&lt;/P&gt;&lt;P&gt;For example, 204.45 are 204 hours and 45 minutes.&lt;/P&gt;&lt;P&gt;I turn around in minutes (see field min20) and after turn into days with the div function and create the g20 field. One business day corresponds to 455 minutes. In my example should give 12285/455 27 whereas in QLV get 26.&lt;/P&gt;&lt;P&gt;Why is this happening?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Feb 2016 12:30:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-hours-and-minutes/m-p/1027058#M347023</guid>
      <dc:creator />
      <dc:date>2016-02-25T12:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with hours and minutes</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-hours-and-minutes/m-p/1027059#M347024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this may be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;T2:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load *&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; ,floor(H1) as h11&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; ,num(frac(H1)*100,'###') as min11&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; ,((floor(H1) * 60) + num(frac(H1)*100,'###') ) as min20&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; ,Round(((floor(H1) * 60) + (frac(H1)*100) )/ 455) as&amp;nbsp; g20&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;resident T1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Drop table T1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is that your number display 12285, but it is in frac part is slightly less than 45&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/115954_Capture.PNG" style="height: auto;" /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;You can also consider using Ceil() function instead of Round() function&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Feb 2016 12:45:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-hours-and-minutes/m-p/1027059#M347024</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-02-25T12:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with hours and minutes</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-hours-and-minutes/m-p/1027060#M347025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why don't you use the built-in time functions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.g.&lt;/P&gt;&lt;P&gt;Minute(Timestamp#(H1,'hh.mm')) as Min,&lt;/P&gt;&lt;P&gt;Interval(Timestamp#(H1,'hh.mm')) as Hour,&lt;/P&gt;&lt;P&gt;Floor(24*(Timestamp#(H1,'hh.mm'))) as Hours,&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See &lt;A href="https://community.qlik.com/qlik-blogpost/4002"&gt;The Date Function&lt;/A&gt; for more on interpretation functions. The same is applicable for Timestamp#(), Time#(), etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Feb 2016 12:50:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-hours-and-minutes/m-p/1027060#M347025</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2016-02-25T12:50:07Z</dc:date>
    </item>
  </channel>
</rss>

