I have a requirement to round a datetime2 value down to the nearest half hour. For example \'10/17/2013 12:10:00.123\' would round down to \'10/17/2013 12:00:00.0\' And \'10
Here is one way to do it:
update t set d = dateadd(minute,datediff(minute,'19000101',d)/30*30,'19000101');