<?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: Integer to duration in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Integer-to-duration/m-p/1889826#M73304</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Convert this integer to time and change it to the good format. Try this expression :&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;TIME(TIME#([Time_field]/1000, 'ss'),'hh:mm:ss')
// The division by 1000 transform milliseconds into seconds.&lt;/LI-CODE&gt;
&lt;P&gt;Best regards.&lt;/P&gt;</description>
    <pubDate>Mon, 07 Feb 2022 15:15:39 GMT</pubDate>
    <dc:creator>Sbarro2</dc:creator>
    <dc:date>2022-02-07T15:15:39Z</dc:date>
    <item>
      <title>Integer to duration</title>
      <link>https://community.qlik.com/t5/App-Development/Integer-to-duration/m-p/1889637#M73285</link>
      <description>&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="fr" data-phrase-index="0" data-number-of-phrases="11"&gt;&lt;SPAN&gt;Hello, &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="fr" data-phrase-index="0" data-number-of-phrases="11"&gt;&lt;SPAN&gt;I have durations in INTEGER format in a database.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="fr" data-phrase-index="2" data-number-of-phrases="11"&gt;&lt;SPAN&gt;It's integers represent running time in milliseconds.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="fr" data-phrase-index="4" data-number-of-phrases="11"&gt;&lt;SPAN&gt;for example: 1983000 = 00D 00H 33M 03S 00MS&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="fr" data-phrase-index="6" data-number-of-phrases="11"&gt;&lt;SPAN&gt;because: 1983000/60000 = 33.05 ==&amp;gt; 33min + ((05*60)/100) = 3s&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="VIiyi"&gt; &lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="fr" data-phrase-index="8" data-number-of-phrases="11"&gt;&lt;SPAN&gt;How can I get this time value from the integer in QlikSense?&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="fr" data-phrase-index="10" data-number-of-phrases="11"&gt;&lt;SPAN&gt;I tried several functions like time, timestamp or interval, but nothing seems to correspond to what I want to do.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 09:09:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Integer-to-duration/m-p/1889637#M73285</guid>
      <dc:creator>BEKEGE</dc:creator>
      <dc:date>2022-02-07T09:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: Integer to duration</title>
      <link>https://community.qlik.com/t5/App-Development/Integer-to-duration/m-p/1889796#M73299</link>
      <description>&lt;P&gt;use &lt;A href="https://help.qlik.com/en-US/qlikview/May2021/Subsystems/Client/Content/QV_QlikView/Scripting/FormattingFunctions/Interval.htm" target="_self"&gt;Interval().&lt;/A&gt; The important part is the format parameter.&lt;BR /&gt;You may consider first transforming your number into seconds by dividing 100.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Edit&lt;/STRONG&gt;: you have to match the correct qlik number by calculating &lt;EM&gt;SECOND_Field /86400 as Qlik_SECONDS&lt;/EM&gt; //(=24h*60m*60s)&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 14:52:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Integer-to-duration/m-p/1889796#M73299</guid>
      <dc:creator>chris_djih</dc:creator>
      <dc:date>2022-02-07T14:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: Integer to duration</title>
      <link>https://community.qlik.com/t5/App-Development/Integer-to-duration/m-p/1889826#M73304</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Convert this integer to time and change it to the good format. Try this expression :&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;TIME(TIME#([Time_field]/1000, 'ss'),'hh:mm:ss')
// The division by 1000 transform milliseconds into seconds.&lt;/LI-CODE&gt;
&lt;P&gt;Best regards.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 15:15:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Integer-to-duration/m-p/1889826#M73304</guid>
      <dc:creator>Sbarro2</dc:creator>
      <dc:date>2022-02-07T15:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: Integer to duration</title>
      <link>https://community.qlik.com/t5/App-Development/Integer-to-duration/m-p/1889961#M73316</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;another solution might be:&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="MarcoWedel_0-1644268126584.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/71750i9E3A482B57FD1C24/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MarcoWedel_0-1644268126584.png" alt="MarcoWedel_0-1644268126584.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;table1:
Load *,
     Interval(duration/86400000,'d hh:mm:ss.fff') as durationInterval
Inline [
duration
1
10
100
1000
10000
86400
100000
1000000
1983000
1983123
10000000
86399999
86400000
86400001
100000000
171943210
];&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;hope this helps&lt;/P&gt;
&lt;P&gt;Marco&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 21:09:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Integer-to-duration/m-p/1889961#M73316</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2022-02-07T21:09:19Z</dc:date>
    </item>
  </channel>
</rss>

