日期:2014-05-17 浏览次数:20666 次
declare @s varchar(8)
set @s=''
print isdate(@s)
print case when isdate(@s)=0 then '' else cast(@s as datetime) end
declare @s varchar(8)
set @s=''
--print isdate(@s)
select case when isdate(@s)=0 then '' else convert(varchar(10),@s,120) end