If you want to truncate seconds and still have the T-SQL Date data type, first convert the date to minutes from the date โ0โ, and then add the minutes to โ0โ. This answer does not require additional analysis / conversion. This method works to truncate other parts that only replace MINUTE. Example: SELECT DATEADD(MINUTE, DATEDIFF(MINUTE, 0, '2016-01-01 23:22:56.997'), 0)
Daniel Leach
source share