Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Incorrect INTERVAL SECOND result
Thu, Apr 19 2007 1:36 PMPermanent Link

"Ole Willy Tuv"
Tim,

The result of the following interval expression looks incorrect to me:

select
 cast((timestamp'2007-04-18 16:16:43'-timestamp'1899-12-30 00:00:00')
second as bigint)
from dummy

EDB 1.02 b1 returns the value -908892693.

Mimer SQL returns the value 3386074603, and so does my own calculation using
the following algorithm:

cast((cast(timestamp'2007-04-18 16:16:43' as double
precision)-cast(timestamp'1899-12-30 00:00:00' as double precision))*86400
as bigint)

Ole Willy Tuv

Thu, Apr 19 2007 6:40 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ole,

<< The result of the following interval expression looks incorrect to me: >>

It's the same as the milliseconds issue - there's an overflow issue when the
number of milliseconds or seconds is greater than High(Integer).

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, Apr 19 2007 6:45 PMPermanent Link

"Ole Willy Tuv"
<< It's the same as the milliseconds issue - there's an overflow issue when
the number of milliseconds or seconds is greater than High(Integer). >>

OK, so I assume that a fix will be included in the next build ?

Ole Willy Tuv

Mon, Apr 23 2007 4:22 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ole,

<< OK, so I assume that a fix will be included in the next build ? >>

Yep, as always. Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Image