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
 General SQL Server Forums
 New to SQL Server Programming
 getdate() with milliseconds

Author  Topic 

norm.p
Starting Member

1 Post

Posted - 2009-08-31 : 13:02:02
I want to view my datetime type field with milliseconds. I am NOT using smalldatetime.

I have configured the column to default on insert and I am seeing values such as 8/31/2009 12:51:51 PM. Is the issue with my SELECT sql or other? I worked it for way too long and any help is appreciated.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-08-31 : 13:14:25
That's just a formatting thing. The data actually contains milliseconds. To see the full value, check out the CONVERT function in BOL and provide the appropriate style.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

Nageswar9
Aged Yak Warrior

600 Posts

Posted - 2009-08-31 : 23:56:23
Hi see this site

http://www.sql-server-helper.com/tips/date-formats.aspx
Go to Top of Page
   

- Advertisement -