SELECT CONVERT(Varchar(10), dateRecorded, 103) AS dateRecorded
FROM (SELECT DISTINCT CONVERT(DATETIME, CONVERT(Varchar(10), cs.dateRecorded, 103)) AS dateRecorded
FROM Components AS c INNER JOIN
ComponentStatus AS cs ON c.component_id = cs.component_id
WHERE (c.machine_id = 10)) AS A
ORDER BY dateRecorded DESC
-------------------------
SELECT CONVERT(varchar, dateRecorded, 103) AS dateRecorded
FROM (SELECT DISTINCT CONVERT(DATETIME, CONVERT(varchar, cs.dateRecorded, 101),101) AS dateRecorded
FROM Components AS c INNER JOIN
ComponentStatus AS cs ON c.component_id = cs.component_id
WHERE (c.machine_id = 10)) AS A
ORDER BY dateRecorded DESC
-----------------------------------------
SELECT CONVERT(varchar, dateRecorded, 103) AS dateRecorded2
FROM (SELECT DISTINCT CONVERT(DATETIME, CONVERT(varchar, cs.dateRecorded, 103),103) AS dateRecorded
FROM Components AS c INNER JOIN
ComponentStatus AS cs ON c.component_id = cs.component_id
WHERE (c.machine_id = 10)) AS A
ORDER BY dateRecorded DESC
------------------------------------------------
第三个是成功的,但是不好的地方在于column的名字改变了;
而如果不改变名字,就没办法排序了,shit!