Subject Re: Problem with TIMESTAMP field precision
Author alexanderl3
Why not use Trunc instead of Round then?
timestamp_time := Trunc(IBTimeDivider*Abs(Frac(Value)));

The time won't be precise, but in Delphi Now function returns a double -
15-16 digit result. There are still 2-3 meaningless random digits
that can sway Round one way or another.

--- In firebird-support@yahoogroups.com, "Dmitry Sibiryakov" <SD@t...>
wrote:
> On 18 Aug 2005 at 12:18, Ivan Prenosil wrote:
>
> >If you have time very close to midnight, it could be Rounded to next
> >day, i.e. something like
> > 23:59:59.9999 -> 1 day + 0:0:0
> >Because date and time are stored separately,
> >and because the whole day will be cut off from time part
> >by Firebird, as a result you will loose one whole day !
>
> Let's hope that nobody can provide time with precision greater than
> 1/10000sec...
>
> --
> SY, Dimitry Sibiryakov.