Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread 1.02 build 1 - intervals revisited
Thu, Apr 5 2007 8:26 AMPermanent Link

"Ole Willy Tuv"
Single-field interval types:

select
 (date'2007-04-05'-date'1970-03-12') year "year",
 (date'2007-04-05'-date'1970-03-12') month "month",
 (date'2007-04-05'-date'1970-03-12') day "day",
 (date'2007-04-05'-date'1970-03-12') hour "hour",
 (date'2007-04-05'-date'1970-03-12') minute "minute",
 (date'2007-04-05'-date'1970-03-12') second "second",
 (date'2007-04-05'-date'1970-03-12') msecond "millisecond"
from dummy

               Result                    Correct values
------------------------------------------------
year          444                       37
month       445                       444 or 445
day           1169683200000   13538
hour          1169683200000   324912
minute       1169683200000   19494720
second      1169683200000   1169683200
msecond   1452095488         1169683200000
------------------------------------------------

EDB returns a value representing the interval in months for year-month
intervals and the interval in milliseconds for day-time intervals. These
values are incorrect and don't make sense, except for the interval type with
precision month. The correct and expected values are intervals representing
the defined interval precision.

Ole Willy Tuv

Thu, Apr 5 2007 12:27 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ole,

<< EDB returns a value representing the interval in months for year-month
intervals and the interval in milliseconds for day-time intervals. These
values are incorrect and don't make sense, except for the interval type with
precision month. The correct and expected values are intervals representing
the defined interval precision. >>

You have to CAST() them to an integer if you want them to be visible in the
desired form in Delphi.  This goes back to what I said before in terms of
Delphi not having field types for intervals.  What you're seeing is the
interval value in its native form.

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, Apr 5 2007 12:52 PMPermanent Link

"Ole Willy Tuv"
Tim,

<< You have to CAST() them to an integer if you want them to be visible in
the desired form in Delphi.  This goes back to what I said before in terms
of Delphi not having field types for intervals.  What you're seeing is the
interval value in its native form. >>

OK, but please check the msecond value. What does it represent ?

Ole Willy Tuv

Fri, Apr 6 2007 2:56 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ole,

<< OK, but please check the msecond value. What does it represent ? >>

Yeah, sorry, I missed that one.  It's definitely not correct - it should be
the same as the others.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image