Subject Re: [firebird-support] TIMESTAMP arithmatic niggle
Author Ivan Prenosil
From: "Lester Caine"
> DELETE = CURRENT_TIMESTAMP + (30.0 / 1440.0) gives +30 minutes
> but
> DELETE = CURRENT_TIMESTAMP + (1.0 / 1440.0) does not give +1
> minute
> I would rather make the number of minutes an offset that the
> user can change, and do the arithmetic for them, but all
> attempts at times less then about 20 minutes 'round' to
> zero. Anybody see where I am going wrong?

Since time is internally stored as integer (0.0001 sec precision),
the best method is to do the integer math, unfortunately, it is not
directly possible in Firebird; you may however use UDF, e.g.
addMinute, addSecond etc. in fbudf.dll (written by Caludio).

Another good possibility is to do the math in double precision
(since you do not have to worry about number of decimal places), e.g.