How to Choose the Best Date and Time Data Types for a SQL Server Database

Select the optimum data type for date and time columns to meet your requirements. It can minimize data storage needs, boost performance, and reduce expenses.

Randy Runtsch
8 min readApr 11, 2021
Brett Jordan
Clock and calendar photo courtesy of Brett Jordan on Unsplash.

When designing and implementing a Microsoft SQL Server database, it is best to equip yourself with awareness of all available data types, including the date and time types. Choosing the best-suited date and time type for each column that will store date and time values will ensure that the database implementation will meet storage and processing requirements over the short and long terms.

This article describes each data and time data type and how to select the one that best meets your needs.

Date and Time Data Type Definitions

The following sections summarize the date and time data types available in SQL Server. See detailed descriptions in the Date & time type pages of Microsoft’s Transact-SQL (T-SQL) Reference documentation. All date and time data types, except for time, are based on the Gregorian calendar.

Here is an overview of the date and time data types:

  • date — Stores dates from 0001–01–01 through…

--

--

Randy Runtsch
Randy Runtsch

Written by Randy Runtsch

Writer | Photographer | Outdoor Lover | Adventure Cyclist | Business Owner | Data Analyst | Software Developer