Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesI noticed that my tables are not storing the milisecond values that I am inserting. Is this a bug? If not, can someone please explain what is going or or point me to a resource so I can research it further. create table #t (col1 int identity,col2 datetime) insert into #t (col2) SELECT '2006-03-21 18:59:50.985' select * from #t
Post Follow-up to this messageHi Dave, Thats curious, in SQL 2000 this script: create table #t (col1 int identity,col2 datetime) insert into #t (col2) SELECT '2006-03-21 18:59:50.985' select * from #t Results in: 2006-03-21 18:59:50.987 If I look up "datetime and smalldatetime" in Books Online it says: "Date and time data from January 1, 1753 through December 31, 9999, to an accuracy of one three-hundredth of a second (equivalent to 3.33 milliseconds or 0.00333 seconds). Values are rounded to increments of .000, .003, or .007 seconds, as shown in the table. (the table below not included here)" Maybe this helps you somehow. -- -Dick Christoph "Dave" <daveg.01@gmail.com> wrote in message news:1143152560.420148.112820@e56g2000cwe.googlegroups.com... >I noticed that my tables are not storing the milisecond values that I > am inserting. Is this a bug? If not, can someone please explain what > is going or or point me to a resource so I can research it further. > > > create table #t (col1 int identity,col2 datetime) > insert into #t (col2) > SELECT '2006-03-21 18:59:50.985' > select * from #t >
Post Follow-up to this messageYes, it does. I should have looked this up. It rounds to the nearest .003 second. Thanks!
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread