Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 How to Get exact milliseconds

Author  Topic 

dharmat
Starting Member

1 Post

Posted - 2009-10-02 : 05:44:05
Hi all,
see example
create table t(dt datetime)
insert into t values('06/30/2009 14:44:51.625')
select datepart(ms,dt) from t out put for this 627

Please advise me how to get exact milliseconds which exist in database.

Thanks in advance.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-10-02 : 06:15:58
sql server 2005 datetime has accuracy only upto 1/3rd of a millisecond. also from sql server books online

datetime values are rounded to increments of .000, .003, or .007 seconds
Go to Top of Page
   

- Advertisement -