Here a script you can use to test the 3 methods.
There is a measureable difference between the convert to varchar and the other 2 options.
Only when you increase the number of iterations > 30,000 do you start to see the speed improvement of the last one
(dateadd(datediff)) but as others have said for a small number of conversions any will work - as long as you take into account the locale specific needs for the varchar option.
Kevin
*****************************
declare @loop int, @d datetime
declare @lMax int
set @lMax = 3000
declare @dStart datetime, @dEnd datetime
--various methods to strip off the time portion off a date
set nocount on
set @loop = 1
set @dStart = getdate()
--uses convert
while @loop <@lMax
begin
set @d= CONVERT(datetime, CONVERT(varchar, getdate(), 101))
set @loop = @loop + 1
end
select datediff(ms, @dStart,getdate())
set @loop = 1
set @dStart = getdate()
--uses cast
while @loop <@lMax
begin
set @d = cast(floor(cast(getdate() as float)) as datetime)
set @loop = @loop + 1
end
select datediff(ms, @dStart,getdate())
set @loop = 1
set @dStart = getdate()
--uses datediff, dateadd
while @loop <@lMax
begin
set @d= dateadd(d, 0, datediff(d, 0, getdate()))
set @loop = @loop + 1
end
select datediff(ms, @dStart,getdate())
set nocount off