Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

bug - insert miliseconds
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


Report this thread to moderator Post Follow-up to this message
Old Post
Dave
03-24-06 01:34 AM


Re: bug - insert miliseconds
Hi 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
>



Report this thread to moderator Post Follow-up to this message
Old Post
DickChristoph
03-24-06 01:34 AM


Re: bug - insert miliseconds
Yes, it does.  I should have looked this up.  It rounds to the nearest
.003 second.

Thanks!


Report this thread to moderator Post Follow-up to this message
Old Post
Dave
03-24-06 02:31 PM


Sponsored Links





Last Thread Next Thread
Post New Thread

Microsoft SQL Server forum archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 10:09 AM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006