<?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: Calculate hours between two dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-dates/m-p/706426#M672149</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;(date_prise_charge_h-date_creation_h)*24&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Sep 2014 12:50:48 GMT</pubDate>
    <dc:creator>MarcoWedel</dc:creator>
    <dc:date>2014-09-26T12:50:48Z</dc:date>
    <item>
      <title>Calculate hours between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-dates/m-p/706422#M672139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I want to know the numbers of hours between two dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="287" style="border: 0px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; height: 291px; width: 305px;" width="305"&gt;&lt;TBODY style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl65" height="17" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;" width="97"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;date_creation_h&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl65" style="padding-right: 4px; padding-left: 4px; border-style: solid solid solid none; border-top-color: black; border-right-color: black; border-bottom-color: black; font-style: inherit; font-family: inherit;" width="124"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;date_prise_charge_h&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="17" style="padding-right: 4px; padding-left: 4px; border-style: none solid solid; border-right-color: black; border-bottom-color: black; border-left-color: black; font-style: inherit; font-family: inherit;"&gt;02/01/2014 23:14&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-style: none solid solid none; border-right-color: black; border-bottom-color: black; font-style: inherit; font-family: inherit;"&gt;06/01/2014 09:37&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="17" style="padding-right: 4px; padding-left: 4px; border-style: none solid solid; border-right-color: black; border-bottom-color: black; border-left-color: black; font-style: inherit; font-family: inherit;"&gt;03/01/2014 16:24&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-style: none solid solid none; border-right-color: black; border-bottom-color: black; font-style: inherit; font-family: inherit;"&gt;06/01/2014 09:35&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="17" style="padding-right: 4px; padding-left: 4px; border-style: none solid solid; border-right-color: black; border-bottom-color: black; border-left-color: black; font-style: inherit; font-family: inherit;"&gt;09/01/2014 03:32&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-style: none solid solid none; border-right-color: black; border-bottom-color: black; font-style: inherit; font-family: inherit;"&gt;09/01/2014 09:56&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="17" style="padding-right: 4px; padding-left: 4px; border-style: none solid solid; border-right-color: black; border-bottom-color: black; border-left-color: black; font-style: inherit; font-family: inherit;"&gt;11/01/2014 01:05&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-style: none solid solid none; border-right-color: black; border-bottom-color: black; font-style: inherit; font-family: inherit;"&gt;13/01/2014 10:11&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="17" style="padding-right: 4px; padding-left: 4px; border-style: none solid solid; border-right-color: black; border-bottom-color: black; border-left-color: black; font-style: inherit; font-family: inherit;"&gt;15/01/2014 07:11&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-style: none solid solid none; border-right-color: black; border-bottom-color: black; font-style: inherit; font-family: inherit;"&gt;15/01/2014 09:44&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="17" style="padding-right: 4px; padding-left: 4px; border-style: none solid solid; border-right-color: black; border-bottom-color: black; border-left-color: black; font-style: inherit; font-family: inherit;"&gt;16/01/2014 16:42&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-style: none solid solid none; border-right-color: black; border-bottom-color: black; font-style: inherit; font-family: inherit;"&gt;16/01/2014 18:11&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;In my script :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Main :&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SET TimeFormat='hh:mm';&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SET DateFormat='DD/MM/YYYY';&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SET TimestampFormat='DD/MM/YYYY hh:mm';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;At the loading of my data : &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Time(([Date clôture&amp;nbsp; ] - [Date de prise en charge&amp;nbsp; ]),'hh:mm') as tps_traitement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;This doesn't work, if somebody have an idea!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Thanks.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Emilien&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 12:43:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-dates/m-p/706422#M672139</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-26T12:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-dates/m-p/706423#M672142</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;Use Interval()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like interval(dateField2-dateField1,'hh:mm')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 12:46:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-dates/m-p/706423#M672142</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2014-09-26T12:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-dates/m-p/706424#M672145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or to return hours only using 'hh' instead of 'hh:mm'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 12:47:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-dates/m-p/706424#M672145</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-26T12:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-dates/m-p/706425#M672147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i used this script with your data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET TimeFormat='hh:mm';&lt;/P&gt;&lt;P&gt;SET DateFormat='DD/MM/YYYY';&lt;/P&gt;&lt;P&gt;SET TimestampFormat='DD/MM/YYYY hh:mm';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp; Interval( Timestamp(date_creation_h) - Timestamp(date_prise_charge_h)) as Hours,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Timestamp(date_creation_h) as date_creation_h,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Timestamp(date_prise_charge_h) as date_prise_charge_h;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date_creation_h, date_prise_charge_h&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 02/01/2014 23:14, 06/01/2014 09:37&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 03/01/2014 16:24, 06/01/2014 09:35&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 09/01/2014 03:32, 09/01/2014 09:56&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11/01/2014 01:05, 13/01/2014 10:11&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15/01/2014 07:11, 15/01/2014 09:44&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 16/01/2014 16:42, 16/01/2014 18:11&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get this result. Does it work ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/67745_Capture.PNG.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 12:49:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-dates/m-p/706425#M672147</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-09-26T12:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-dates/m-p/706426#M672149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;(date_prise_charge_h-date_creation_h)*24&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 12:50:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-dates/m-p/706426#M672149</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-09-26T12:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-dates/m-p/706427#M672150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This syntax work also : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;date_creation_h, date_prise_charge_h,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;interval(date#(date_prise_charge_h, 'DD/MM/YYYY hh:mm') - date#(date_creation_h, 'DD/MM/YYYY hh:mm'), 'hh') as h1,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;date#(date_prise_charge_h, 'DD/MM/YYYY hh:mm') - date#(date_creation_h, 'DD/MM/YYYY hh:mm') as h2&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Thank you all&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 13:36:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-hours-between-two-dates/m-p/706427#M672150</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-26T13:36:32Z</dc:date>
    </item>
  </channel>
</rss>

