Tag: datetime2

SQL Server 2008 Datatypes and the Death of Datetime

Beginning with SQL Server 2008, the datatypes which store date and time were greatly improved. Despite this, many legacy databases (and often newly developed ones) still useDatetimeandSmallDatetime, the original datatypes. Aside from the dwindling possibility of backwards compatibility issues, there is no advantage to using these old datatypes; as this article will show, the new implementations are superior in every way.SQL 2005 and Earlier: Datetime and SmallDatetimeDatetimeandSmallDatetimeare the original temporal SQL Server datatypes, and the only options available in SQL Server 2005 and earlier. During this time, SQL Server date support was widely criticized for its lack of options. Other database systems, such as Oracle, already featured individual datatypes for date and time, as well as specific functionality for time zones.