|
Posted by Hugo Kornelis on 09/26/06 19:53
On 26 Sep 2006 11:28:07 -0700, jim_geissman@countrywide.com wrote:
>According to MS, GetLocalTime() (in C++) is only accurate to approx a
>second,
>even though it reports milliseconds, and calling it twice and computing
>the
>interval can on occasion lead to a negative interval.
>
>Is T-SQL's GetDate() more accurate than that, or at least
>non-decreasing?
Hi Jim,
Getdate() (or, to use the ANSI standard name, CURRENT_TIMESTAMP) is
accurate to 1/300th of a second. I've never seen it decrease. Apart from
that, it is as accurate as the system clock of the server - if an admin
sets the system clock three hours back, SQL Server will report from the
past.
--
Hugo Kornelis, SQL Server MVP
Navigation:
[Reply to this message]
|