<?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 Differences in Interval() between 64- and 32-bit version? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Differences-in-Interval-between-64-and-32-bit-version/m-p/342394#M492670</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, I've been going a little crazy trying to figure this out, but I think I've finally narrowed it down.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to figure out the age of a record by getting the difference between today and the date the record was created.&amp;nbsp; I used the following code as an expression in a crosstab table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= Interval(Date(now(2), 'MM/dd/yyyy hh:mm') - Date#([UCO Open Date], 'MM/dd/yyyy hh:mm'),'dd')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On my 32-bit machine, which I use for development, this worked fine.&amp;nbsp; So, I deployed it and later on noticed that all the Ages were "0".&amp;nbsp; Eventually, I narrowed it down by brute force to the following code, which works on the 64-bit machine:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= Interval(Date(now(2), 'MM/dd/yyyy hh:mm') - Date([UCO Open Date], 'MM/dd/yyyy hh:mm'),'dd')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice: all I did was change Date#() to Date().&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I'd be happy with this, but the latter snippet does not work on a 32-bit machine.&amp;nbsp; All the Ages become 0 when I try this on the 32-bit system.&amp;nbsp; So, I'm a little baffled.&amp;nbsp; Perhaps I'm doing something wrong, maybe I should move this into the script?&amp;nbsp; If I had some way to test for the OS, I could switch between the two, and while that seems a little silly, it won't be the first time I have done such a thing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both versions on the machines are identical (other than the different -bit).&amp;nbsp; This effect appears on the QV Accesspoint, as well, which is also 64-bit.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions as to whether I'm dealing with a bug, or doing something wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I've attached the file in case anyone wants to have a look.&amp;nbsp; This would be the Age column on the Unassigned Change Orders table on the Book of Work w/Change Orders tab)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Jul 2012 21:43:50 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-07-09T21:43:50Z</dc:date>
    <item>
      <title>Differences in Interval() between 64- and 32-bit version?</title>
      <link>https://community.qlik.com/t5/QlikView/Differences-in-Interval-between-64-and-32-bit-version/m-p/342394#M492670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, I've been going a little crazy trying to figure this out, but I think I've finally narrowed it down.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to figure out the age of a record by getting the difference between today and the date the record was created.&amp;nbsp; I used the following code as an expression in a crosstab table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= Interval(Date(now(2), 'MM/dd/yyyy hh:mm') - Date#([UCO Open Date], 'MM/dd/yyyy hh:mm'),'dd')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On my 32-bit machine, which I use for development, this worked fine.&amp;nbsp; So, I deployed it and later on noticed that all the Ages were "0".&amp;nbsp; Eventually, I narrowed it down by brute force to the following code, which works on the 64-bit machine:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= Interval(Date(now(2), 'MM/dd/yyyy hh:mm') - Date([UCO Open Date], 'MM/dd/yyyy hh:mm'),'dd')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice: all I did was change Date#() to Date().&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I'd be happy with this, but the latter snippet does not work on a 32-bit machine.&amp;nbsp; All the Ages become 0 when I try this on the 32-bit system.&amp;nbsp; So, I'm a little baffled.&amp;nbsp; Perhaps I'm doing something wrong, maybe I should move this into the script?&amp;nbsp; If I had some way to test for the OS, I could switch between the two, and while that seems a little silly, it won't be the first time I have done such a thing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both versions on the machines are identical (other than the different -bit).&amp;nbsp; This effect appears on the QV Accesspoint, as well, which is also 64-bit.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions as to whether I'm dealing with a bug, or doing something wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I've attached the file in case anyone wants to have a look.&amp;nbsp; This would be the Age column on the Unassigned Change Orders table on the Book of Work w/Change Orders tab)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 21:43:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Differences-in-Interval-between-64-and-32-bit-version/m-p/342394#M492670</guid>
      <dc:creator />
      <dc:date>2012-07-09T21:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: Differences in Interval() between 64- and 32-bit version?</title>
      <link>https://community.qlik.com/t5/QlikView/Differences-in-Interval-between-64-and-32-bit-version/m-p/342395#M492671</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;Perhaps you are overcomplicating the expression. Now() returns a date/time value. If &lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;[UCO Open Date]&lt;/SPAN&gt; is also a date/time value, then &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Interval(Now(2) - [UCO Open Date], 'dd') &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should work on both 32 and 64 bit machines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No, I don;t know why the other expressions were uneven on 32 and 64 bit, but I don't think they are necessary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2012 06:19:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Differences-in-Interval-between-64-and-32-bit-version/m-p/342395#M492671</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2012-07-10T06:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Differences in Interval() between 64- and 32-bit version?</title>
      <link>https://community.qlik.com/t5/QlikView/Differences-in-Interval-between-64-and-32-bit-version/m-p/342396#M492672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I look in your application, I can see that the [UCO Open Date] has not been interpreted as date. So you need to use an interpretation function: Date#([UCO Open Date], 'M/D/YYYY hh:mm').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Further, I suspect that the Now(2) is not well defined on a server: The "2" means "when the document is opened" and that is not necessarily the same as when the session is opened. But I have not verified this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I would suggest that you use the following expression:&lt;/P&gt;&lt;P&gt;= Interval(now(0) - Date#([UCO Open Date], 'M/D/YYYY hh:mm'),'dd')&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, 10 Jul 2012 17:00:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Differences-in-Interval-between-64-and-32-bit-version/m-p/342396#M492672</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2012-07-10T17:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: Differences in Interval() between 64- and 32-bit version?</title>
      <link>https://community.qlik.com/t5/QlikView/Differences-in-Interval-between-64-and-32-bit-version/m-p/342397#M492673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Jonathan Dienst wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps you are overcomplicating the expression. Now() returns a date/time value. If &lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;[UCO Open Date]&lt;/SPAN&gt; is also a date/time value, then &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Interval(Now(2) - [UCO Open Date], 'dd') &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should work on both 32 and 64 bit machines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No, I don;t know why the other expressions were uneven on 32 and 64 bit, but I don't think they are necessary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx for the response, Jonathan.&amp;nbsp; This works on my 64-bit machine, but not on the 32.&amp;nbsp; This is pretty much what I started with and the fact that I couldn't get this to work is what prompted me to bring in the Date functions to begin with.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2012 19:06:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Differences-in-Interval-between-64-and-32-bit-version/m-p/342397#M492673</guid>
      <dc:creator />
      <dc:date>2012-07-10T19:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: Differences in Interval() between 64- and 32-bit version?</title>
      <link>https://community.qlik.com/t5/QlikView/Differences-in-Interval-between-64-and-32-bit-version/m-p/342398#M492674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Henric Cronström wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I look in your application, I can see that the [UCO Open Date] has not been interpreted as date. So you need to use an interpretation function: Date#([UCO Open Date], 'M/D/YYYY hh:mm').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Further, I suspect that the Now(2) is not well defined on a server: The "2" means "when the document is opened" and that is not necessarily the same as when the session is opened. But I have not verified this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I would suggest that you use the following expression:&lt;/P&gt;&lt;P&gt;= Interval(now(0) - Date#([UCO Open Date], 'M/D/YYYY hh:mm'),'dd')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx for the response, Henric,&lt;/P&gt;&lt;P&gt;This works on my 32-bit system but not on the 64.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm thinking that maybe I should just go back to my datasource and calculate the date there.&amp;nbsp; I'm really quite baffled.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx again for trying, guys.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2012 19:10:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Differences-in-Interval-between-64-and-32-bit-version/m-p/342398#M492674</guid>
      <dc:creator />
      <dc:date>2012-07-10T19:10:24Z</dc:date>
    </item>
  </channel>
</rss>

