<?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: Difference between two dates (in hours) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Difference-between-two-dates-in-hours/m-p/1098852#M631481</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This should work&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Interval(Max(Order_Date) - Min(Order_Date),'DD') * 24&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or you can try this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Interval(Max(Order_Date) - Min(Order_Date), 'h')&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Jul 2016 16:49:48 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-07-19T16:49:48Z</dc:date>
    <item>
      <title>Difference between two dates (in hours)</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-dates-in-hours/m-p/1098851#M631480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a date column, let's say Order_Date, which comes from the load of an excel sheet through one of my scripts.This column is a date and its format is DD/MM/YYYY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I would like to do is calculate the difference between the maximum and minimum dates in hours. So I have done the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Interval(Max(Order_Date)-Min(Order_Date),'DD') * 24&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is that correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2016 13:28:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-dates-in-hours/m-p/1098851#M631480</guid>
      <dc:creator />
      <dc:date>2016-07-19T13:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two dates (in hours)</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-dates-in-hours/m-p/1098852#M631481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This should work&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Interval(Max(Order_Date) - Min(Order_Date),'DD') * 24&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or you can try this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Interval(Max(Order_Date) - Min(Order_Date), 'h')&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2016 16:49:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-dates-in-hours/m-p/1098852#M631481</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-19T16:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between two dates (in hours)</title>
      <link>https://community.qlik.com/t5/QlikView/Difference-between-two-dates-in-hours/m-p/1098853#M631482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Interval() function is just a formatting function, so you don't need it in Sunny's first formula. (Doesn't do anything bad, either...). So if you use&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(Max(Order_Date) - Min(Order_Date)) * 24&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;you will get a number corresponding to the number of hours.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And if you use &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Interval(Max(Order_Date) - Min(Order_Date), 'h')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;you will get the number of days, but &lt;EM style="text-decoration: underline;"&gt;formatted&lt;/EM&gt; as hours. E.g. if the difference between min and max is exactly 10 days, the underlying value will be 10, but its textual representation will be '240'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2016 17:04:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Difference-between-two-dates-in-hours/m-p/1098853#M631482</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2016-07-19T17:04:51Z</dc:date>
    </item>
  </channel>
</rss>

