Subject Re: [firebird-support] ERROR? in Time Stamps
Author emel.hu
> 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