SQL Server has supported two basic date and time data types: datetime and smalldatetime. These data types have always allowed storage of date and time data combined in a single instance. But SQL Server 2008 supports four brand new date and time data types: date, time, datetime2, and datetimeoffset to separate date and time. Here I am discussing only two data type date and time among these four.

1. DATE Data Type:

Example

Image1.jpg
Output

Image2.jpg

2. TIME Data Type

Example

Image3.jpg

Output

Image4.jpg