Remove milliseconds from time datatype and also: is there a millisecond-less time datatype?
sql-server-2008, time, type-conversion, types
Solution
One of the easiest way to remove milliseconds is:
SELECT CONVERT(VARCHAR, GETDATE(), 20)
And if you dont want to include milliseconds:
TIME(0) will help
Example
CAST(DATEADD(second, SUM(hora), '00:00:00') AS time(0))
Problem
I have seen posts in the question on how to remove milliseconds from the datetime datatype in MS SQL. But what about the time datatype - what is the easiest way to remove milliseconds from the time datatype? Also: Is there any time datatype in MS SQL (2008) that doesn't include milliseconds? Thanks all!