Subject Re: ERROR? in Time Stamps
Author Ali Gökçen
Hi Emel,
no, there is no error with FB.
You should use as 1.00000/24.0 or 1.0/24.0000000 to force FB to
sense the precision.

Ali

P.S.
1./24 is an irrational number and be carefull here if you need exact
value.( 0.04166666666...)



--- In firebird-support@yahoogroups.com, "emel.hu" <emel@e...> wrote:
>
> > In a stored procedure I need to be able to compare 2 time stamp
values (
> > ie TS1 and TS2)
> >
> > I need to be able to test if (TS1 - 3 minutes) is less than TS2
>
> WI-V1.5.1.4481 Firebird 1.5
>
> It's an error or what wrong in my mind?
>
> select current_timestamp,
> (current_timestamp - 1) as Minus1day, /* OK */
> (current_timestamp - 1.0/2) as Minus12hour, /* OK */
> (current_timestamp - 1.0/3) as Minus8hour, /* Err */
> (current_timestamp - 1.0/4) as Minus6hour, /* Err */
> (current_timestamp - 1.0/6) as Minus4hour, /* Err */
> (current_timestamp - 1.0/12) as Minus2hour, /* Err */
> (current_timestamp - 1.0/24) as Minus1hour /* Err */
> from rdb$database
>
> eMeL