<?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 Need to format average time from decimal to hours:seconds in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-to-format-average-time-from-decimal-to-hours-seconds/m-p/306751#M113303</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thank you Kaushik and Matt.&amp;nbsp; Kaushik, the date function won't work because the order_to_complete is a number not a date.&amp;nbsp; Matt I will give your solution a try.&amp;nbsp; I wasn't sure that I was missing something obvious.&amp;nbsp; I have to use the database function's return because it is based on company workdays and times so that part is not an easy calculation.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Jun 2011 15:39:19 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-06-21T15:39:19Z</dc:date>
    <item>
      <title>Need to format average time from decimal to hours:seconds</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-format-average-time-from-decimal-to-hours-seconds/m-p/306748#M113300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have a calucation below on a dashboard gauge&amp;nbsp; that computes the average time it takes to complete an order.&amp;nbsp; The calculation is done at the database level but returns the hours in franctions, for example 13.85 hours.&amp;nbsp; The users would like QlikView to return the result in the time format HH:SS which would be 13:51 Hrs:Seconds.&amp;nbsp; I've tried a number of attempts with interval, but I was not successful.&amp;nbsp; Any help would be appreciated.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Don&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;=avg((ORDER_TO_COMPLETE_HRS) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2011 15:13:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-format-average-time-from-decimal-to-hours-seconds/m-p/306748#M113300</guid>
      <dc:creator />
      <dc:date>2011-06-21T15:13:11Z</dc:date>
    </item>
    <item>
      <title>Need to format average time from decimal to hours:seconds</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-format-average-time-from-decimal-to-hours-seconds/m-p/306749#M113301</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;&amp;nbsp;&amp;nbsp; you can use date() function to achieve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; for example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; =date(40715.188020833,'h:mm:ss')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hope this will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2011 15:27:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-format-average-time-from-decimal-to-hours-seconds/m-p/306749#M113301</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2011-06-21T15:27:00Z</dc:date>
    </item>
    <item>
      <title>Need to format average time from decimal to hours:seconds</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-format-average-time-from-decimal-to-hours-seconds/m-p/306750#M113302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a complete Pre-Sales / Data Monkey solution but it should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Split out the decimal part of the value ('.85') - this in essence is 85% so use this to calculate 85% of 60 which will then give you the minutes; rebuild the value in the script to deliver your '13:51' value. Functions to use would be right(), and '&amp;amp;'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No reason why this wouldn't work on a line by line basis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There may well be a neater solution but if Qlikview doesn't recognise the value as a date / time then using num() etc isn't going to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any problems just post some sample data and I'll try and take a look.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt - Visual Analytics Ltd&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2011 15:31:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-format-average-time-from-decimal-to-hours-seconds/m-p/306750#M113302</guid>
      <dc:creator>matt_crowther</dc:creator>
      <dc:date>2011-06-21T15:31:41Z</dc:date>
    </item>
    <item>
      <title>Need to format average time from decimal to hours:seconds</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-format-average-time-from-decimal-to-hours-seconds/m-p/306751#M113303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thank you Kaushik and Matt.&amp;nbsp; Kaushik, the date function won't work because the order_to_complete is a number not a date.&amp;nbsp; Matt I will give your solution a try.&amp;nbsp; I wasn't sure that I was missing something obvious.&amp;nbsp; I have to use the database function's return because it is based on company workdays and times so that part is not an easy calculation.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2011 15:39:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-format-average-time-from-decimal-to-hours-seconds/m-p/306751#M113303</guid>
      <dc:creator />
      <dc:date>2011-06-21T15:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: Need to format average time from decimal to hours:seconds</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-format-average-time-from-decimal-to-hours-seconds/m-p/306752#M113304</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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Have a look at the below example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hope this will solve your problem&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2011 16:52:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-format-average-time-from-decimal-to-hours-seconds/m-p/306752#M113304</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2011-06-21T16:52:22Z</dc:date>
    </item>
    <item>
      <title>Need to format average time from decimal to hours:seconds</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-format-average-time-from-decimal-to-hours-seconds/m-p/306753#M113305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Kaushik, thank you very much for your solution.&amp;nbsp; I will be able to add it to my load script and display the time correctly.&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2011 17:17:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-format-average-time-from-decimal-to-hours-seconds/m-p/306753#M113305</guid>
      <dc:creator />
      <dc:date>2011-06-21T17:17:51Z</dc:date>
    </item>
  </channel>
</rss>

