How would you convert a date in the format of:
2012-10-16 07:44:22.000
to this format:
2012-10-16
And no just making the varchar(10) wont work as this question suggests, because I have to compare them and I can't do it with that method. Also nowhere does it give me the value to do that type of conversion.
This is as close as I've come:
declare @DATE DATETIME = '2012-10-16 00:00:000'
SELECT Convert(varchar(20), @DATE,105)
Result = 16-10-2012