Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Interval typecast question
Sat, Aug 16 2008 6:15 AMPermanent Link

Heiko Knuettel
Hi,

I don't get it how to typecast an integer to an interval. I want to achieve something like
this :

FUNCTION INCHOUR(IN ts TIMESTAMP, IN h FLOAT)
RETURNS TIMESTAMP
BEGIN
  RETURN ts + CAST(CAST(h*60 AS INTEGER) AS INTERVAL MINUTE) ;
END;


Thanks in advance,

Heiko
Mon, Aug 18 2008 12:23 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Heiko,

<< I don't get it how to typecast an integer to an interval. I want to
achieve something like this :

It's a bug in the casting of integers to intervals.   A fix will be
available shortly.

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Aug 18 2008 4:31 PMPermanent Link

Heiko Knuettel
Tim,

thanks. I already began trying things like INTERVAL '''+CAST(integer AS STRING)+''''
MINUTE    Smiley

Heiko
Image