<?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: Calculating time in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculating-time-in-script/m-p/1603682#M444534</link>
    <description>&lt;P&gt;Sorry, I am lost in your sample. Could you tell me what is expected output for two values you mentioned in op, 1600&amp;nbsp; (16 hours) and 230( 2 hours 30 mins)? 13 hours 30 mins right.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;You could try like:&lt;/P&gt;&lt;P&gt;=interval(Time#(1600, 'hhmm')-Time#(230, 'hmm'), 'hh:mm')&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jul 2019 12:50:59 GMT</pubDate>
    <dc:creator>tresB</dc:creator>
    <dc:date>2019-07-18T12:50:59Z</dc:date>
    <item>
      <title>Calculating time in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-time-in-script/m-p/1603579#M444526</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having a problem with calculating time.&lt;/P&gt;&lt;P&gt;In our planning-tooldatabase I have 2 time fields. (Planned time and the time spend)&lt;/P&gt;&lt;P&gt;Those are numeric for example if you get 16 hours in the database we zee 1600, if you get 2h and a half you se 230 in the database.&lt;/P&gt;&lt;P&gt;I can create a timefield in the script by using those 2&amp;nbsp;&lt;/P&gt;&lt;P&gt;Interval((left(num(PlannedTime,'0000'),2) * 60 + Mid(num(PlannedTime,'0000'),3,2))/24/60,'hh:mm') as PlannedTimehhmm,&lt;BR /&gt;Time((left(num(PlannedTime,'0000'),2) * 60 + Mid(num(PlannedTime,'0000'),3,2))/24/60,'hh:mm') as PlannedTimeTijdhhmmTime&lt;/P&gt;&lt;P&gt;And the same for the SpendTime.&lt;/P&gt;&lt;P&gt;But how can I subtract those fields so I get the time that is available for this order?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kris&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 20:25:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-time-in-script/m-p/1603579#M444526</guid>
      <dc:creator>kris_vliegen</dc:creator>
      <dc:date>2024-11-16T20:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating time in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-time-in-script/m-p/1603602#M444528</link>
      <description>&lt;P&gt;Could you provide a sample data and expected output for that?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 10:12:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-time-in-script/m-p/1603602#M444528</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2019-07-18T10:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating time in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-time-in-script/m-p/1603638#M444531</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;attached you can find an example.&lt;/P&gt;&lt;P&gt;Hope this is enough.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 11:25:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-time-in-script/m-p/1603638#M444531</guid>
      <dc:creator>kris_vliegen</dc:creator>
      <dc:date>2019-07-18T11:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating time in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-time-in-script/m-p/1603682#M444534</link>
      <description>&lt;P&gt;Sorry, I am lost in your sample. Could you tell me what is expected output for two values you mentioned in op, 1600&amp;nbsp; (16 hours) and 230( 2 hours 30 mins)? 13 hours 30 mins right.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;You could try like:&lt;/P&gt;&lt;P&gt;=interval(Time#(1600, 'hhmm')-Time#(230, 'hmm'), 'hh:mm')&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 12:50:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-time-in-script/m-p/1603682#M444534</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2019-07-18T12:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating time in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-time-in-script/m-p/1603685#M444535</link>
      <description>&lt;P&gt;In this example the planned time is 8 h ( 08:00)&lt;/P&gt;&lt;P&gt;and the person has spend once 20 min and once 30 min -&amp;gt; together 00:50&lt;/P&gt;&lt;P&gt;So the value I would like to see as difference is 07:10&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 12:51:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-time-in-script/m-p/1603685#M444535</guid>
      <dc:creator>kris_vliegen</dc:creator>
      <dc:date>2019-07-18T12:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating time in script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-time-in-script/m-p/1603686#M444536</link>
      <description>&lt;P&gt;Well, try this:&lt;/P&gt;&lt;P&gt;=interval(PlannedTimehhmm-Sum(Spendtime.URSpendTimehhmm), 'hh:mm')&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 12:54:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-time-in-script/m-p/1603686#M444536</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2019-07-18T12:54:35Z</dc:date>
    </item>
  </channel>
</rss>

