I am trying to convert a Datetime from 29/07/2011 00:00:00 this from this format to just 29/07/2011. I do this with a SELECT statement
SELECT CONVERT(nvarchar(10), thisDate, 103) As thisDate ... ORDER BY thisDate
This gives an order of something like this
01/08/2011
02/08/2011
05/06/2011
08/07/2011
14/07/2011
21/06/2010
21/07/2011
23/07/2011
24/07/2011
24/07/2011
However when I use 101 or 102 formatting the results are correct and the dates are ordered correctly.
Your solution doesn’t work because SQL server is trying to sort based on a text string which gets sorted alphabetically, instead of sorting by date.
Try doing this to your query: