October 13, 2009 at 10:14 pm
Hi,
According to BOL the datetime field would round to 0.33 ms, but we want to store exact and accurate millisecond using datetime field such that 0.001 s and 0.002 s would not round to 0.000 s, as this rounding would cause us trouble and inconvenince for datetime comparison and calculation when communicating with other programming language(e.g. C++/Java/.Net). Is there any other alternative to solve such kind of problem? Thanks a lot.
Best regards,
Wallace
October 14, 2009 at 1:16 am
The minimum granularity of datetime is 3ms. Basically as long as you are using datetime that is as good as it gets. You could store it as a seperate field, but that is about it..
CEWII
October 14, 2009 at 7:56 am
You can use Datetime2 if you are running your database in SQL 2008. It has a 100 nanoseconds accuracy.
October 14, 2009 at 1:40 pm
Upgrade to SQL Server 2008 and use datetime2.
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply