我希望以升序的方式从我的dbtable命名为tblFormno2获取不同的日期.为此,我编写了以下查询,但它无法正常工作.
列date_submit声明为datetime
select distinct (convert(nvarchar(100),date_submit,103)) as dob from
tblFormno2 order by dob asc
输出显示为
05/07/2011
06/03/2011
06/07/2011
07/04/2011
08/01/2012
代替
06/03/2011
07/04/2011
05/07/2011
06/07/2011
08/01/2012
如何解决这个问题呢 ???
最佳答案 怎么样
select convert(nvarchar(10), date_submit_inner, 103) as date_submit from
(
select distinct date_submit as date_submit_inner from tblFormno2
) as T
order by T.date_submit_inner asc