datetime precision

  • Comments posted to this topic are about the item datetime precision

  • Hi, This is great. We use the following constraint and sanitation before assignment on date only columns in SQL 2005:

    check (dateAdd(dd, datediff(dd, 0, datetimeColumn), 0) = datetimeColumn)

    I believe at least some of your wishes MS has implemented in SQL 2008. See here under embedded links: http://msdn.microsoft.com and here http://www.sql-server-performance.com.

    The DATETIME function’s major change in SQL Server 2008 is the four DATETIME data types introduced. They are DATE, TIME, DATETIMEOFFSET and DATETIME2. IN addition to these newly introduced data types, there are new DATETIME functions all well.

  • Thanks Bill, another good script.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply