Subject Re: [firebird-support] Strange timestamp math w/ FB 2.5
Author Kjell Rilbe
Helen Borrie skriver:
> At 04:23 PM 21/10/2010, Kjell Rilbe wrote:
> >Helen Borrie skriver:
> >> The difference between two timestamps returns a result in days. 0.0002
> >> of a day is 17.28 seconds....but the interval calculation corrects to 4
> >> places of decimal. So, for example, if the elapsed time was actually
> >> 16.703 seconds, the corrected result in days would be still be 0.0002.
> >
> >Oh. But does datediff provide better precision?
>
> Maybe...or not...probably the only one who really knows about the
> precision of the function's output is Adriano, who wrote the code. Did
> you test?
>
> Did you happen to notice the OP was asking about why his timestamp 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.

I might have tried it, yes. On the other hand, Rick (the OP) can try it
in his application instead. This is probably better.

Regards,
Kjell
--
------------------------------
Kjell Rilbe
DataDIA AB
E-post: kjell.rilbe@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64


[Non-text portions of this message have been removed]