--> 测试数据:#
if object_id('tempdb.dbo.#') is not null drop table #
create table #(s varchar(9))
insert into #
select '2011-1-19' union all
select '1-19' union all
select '233321' union all
select '随意字符'
select *, convert(datetime, case isdate(s) when 1 then s else '1900' end) from #
/*
s
--------- -----------------------
2011-1-19 2011-01-19 00:00:00.000
1-19 1900-01-01 00:00:00.000
233321 1900-01-01 00:00:00.000
随意字符 1900-01-01 00:00:00.000
*/
------解决方案--------------------