Subject Re: TIMESTAMP arithmatic niggle
Author Svein Erling
--- In firebird-support@yahoogroups.com, Lester Caine wrote:
> FB1.5 RC7
>
> I am moving some stuff from the client app into triggers for
> use with PHP, and am having a little problem adding 'time'
> to a TIMESTAMP. ( It works fine if done in Builder before
> supplying to FB :) )
>
> DELETE = CURRENT_TIMESTAMP + 1 gives +24 hours
>
> DELETE = CURRENT_TIMESTAMP + 0.0007 gives +1 minute
>
> 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?

Hi Lester!
If the limit had been 15 minutes rather than 20, that would have been
where the time passed two decimals. I have not even tried Fb 1.5
myself yet, but on Fb 1.0.2 I get one minute (or at least 59 second)
added by using

CURRENT_TIMESTAMP + (1.000 / 1440.000)

Set