sql server 的话用
select *,convert(char(8),合同截至时间,112) from yulong order by convert(char(8),合同截至时间,112) desc