This article contains examples of converting a smalldatetime value to a datetime2 value in SQL Server.
The smalldatetime data type doesn’t have any fractional seconds, and its seconds component is always set to zero (:00). Its accuracy is to the nearest minute.
The datetime2 data type on the other hand, allows you to specify a fractional seconds precision from 0 to 7. If you don’t specify this, it will use 7 (the default). If you specify zero (0
), its accuracy will be to the nearest second.
When you convert a smalldatetime value to datetime2, the hours and minutes are copied. The seconds and fractional seconds are set to 0.