In SQL, you use date and time data types to store calendar information. These data types include the time, date, smalldatetime, datetime, datetime2, and datetimeoffset. Each data type has a specific format.
Data typeFormattimehh:mm:ss[.nnnnnnn]dateYYYY-MM-DDsmalldatetimeYYYY-MM-DD hh:mm:ssdatetim...