<?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: Formatting time in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Formatting-time/m-p/1680356#M450027</link>
    <description>&lt;P&gt;Thanx, this works perfect!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Feb 2020 12:41:40 GMT</pubDate>
    <dc:creator>johnan</dc:creator>
    <dc:date>2020-02-28T12:41:40Z</dc:date>
    <item>
      <title>Formatting time</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-time/m-p/1680306#M450020</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Got this:&lt;BR /&gt;1.&lt;/P&gt;&lt;P&gt;=if(Interval(EndTime,'hh:mm:ss')-Interval(StartTime,'hh:mm:ss')&amp;gt;='00:00:20',[Pick plan number])&lt;BR /&gt;This will show the&amp;nbsp;Pick plan number if the time between end and start is over 20 seconds.&lt;BR /&gt;So it works great for me.&lt;/P&gt;&lt;P&gt;Is time from AS400 and formatted in Script:&lt;BR /&gt;time(time#(num(PKVSTR,'000000'),'hhmmss')) as StartTime,&lt;BR /&gt;time(time#(num(PKLEND,'000000'),'hhmmss')) as EndTime,&lt;/P&gt;&lt;P&gt;----------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;2.&lt;BR /&gt;I want to do the same but use the QlikView reload and use the time instead.&lt;BR /&gt;&lt;BR /&gt;=if(Interval(reload_time,'hh:mm:ss')-Interval(StartTime,'hh:mm:ss')&amp;gt;='00:00:04',[Pick plan number])&lt;BR /&gt;So the starttime is not changed from above, only reload_time is changed to QlikView's reload time.&lt;BR /&gt;This wont work as number 1 above &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In script:&lt;BR /&gt;time(time#(num(PKVSTR,'000000'),'hhmmss')) as StartTime,&lt;BR /&gt;Time(ReloadTime()) AS reload_time&lt;/P&gt;&lt;P&gt;What do i missing?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 10:48:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-time/m-p/1680306#M450020</guid>
      <dc:creator>johnan</dc:creator>
      <dc:date>2020-02-28T10:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting time</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-time/m-p/1680311#M450021</link>
      <description>&lt;P&gt;Hi, It is because the ReloadTime() gives date as well.&lt;/P&gt;&lt;P&gt;So you will have to remove the date from the calculation and then it will work.&lt;/P&gt;&lt;P&gt;Try this code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Load&amp;nbsp;&lt;/P&gt;&lt;P&gt;Time(ReloadTime() - Floor(ReloadTime())) as&amp;nbsp;&lt;SPAN&gt;reload_time&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 10:51:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-time/m-p/1680311#M450021</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2020-02-28T10:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting time</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-time/m-p/1680330#M450023</link>
      <description>&lt;P&gt;The formatting functions (like Interval() and Time()) do not change the underlying values, so Time(timestamp) does not remove the date. Also formatting functions are just clutter inside a calculation, as you will not see the format that was applied and it has no effect on the result either.&lt;/P&gt;&lt;P&gt;So what i think you need is the load script:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Time(Time#(Num(PKVSTR, '000000'), 'hhmmss')) as StartTime,
Time(Frac(ReloadTime())) AS reload_time,&lt;/LI-CODE&gt;&lt;P&gt;And the expression:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=If(reload_time - StartTime &amp;gt;= 4/86400, [Pick plan number])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;or, if you prefer:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=If(reload_time - StartTime &amp;gt;= Interval#(4, 's'), [Pick plan number])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS: 86400 is the number of seconds in a day&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 11:33:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-time/m-p/1680330#M450023</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2020-02-28T11:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting time</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-time/m-p/1680356#M450027</link>
      <description>&lt;P&gt;Thanx, this works perfect!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 12:41:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-time/m-p/1680356#M450027</guid>
      <dc:creator>johnan</dc:creator>
      <dc:date>2020-02-28T12:41:40Z</dc:date>
    </item>
  </channel>
</rss>

