Subject | Re: [firebird-support] Strange timestamp math w/ FB 2.5 |
---|---|
Author | Paul Vinkenoog |
Post date | 2010-10-21T21:43:27Z |
Kjell Rilbe wrote:
decimal(18,4), so the precision becomes 8,64 sec (1/10000 of a day).
Multiplication by 86400 before storing the result in the var gives
millisecond precision (the fourth digit after the decimal point is
meaningless: 'NOW' has milliseconds precision).
Of course using datediff([milli]second, t0, t1) is easier and
clearer.
Cheers,
Paul Vinkenoog
>> Did you happen to notice the OP was asking about why his timestampThe subtraction result is precise enough, but Rick stores it in a
>> math wasn't giving him the result he expected, not about how to use
>> datetime functions?
>
> Yes, I noticed. But I thought it might be relevant for what he's
> trying to do to find an alternative method, since apparently a
> simple subtraction doesn't give enough precision to measure seconds,
> which I perceive he needs.
decimal(18,4), so the precision becomes 8,64 sec (1/10000 of a day).
Multiplication by 86400 before storing the result in the var gives
millisecond precision (the fourth digit after the decimal point is
meaningless: 'NOW' has milliseconds precision).
Of course using datediff([milli]second, t0, t1) is easier and
clearer.
Cheers,
Paul Vinkenoog