declare @s varchar(50) set @s = '2008-11-28' if isdate( @s )=1 begin select cast(@s as datetime) end 结果:2008-11-28 00:00:00.000
select cast(col as datetime) from tb where isdate(col)=1
34,576
社区成员
254,588
社区内容
加载中
试试用AI创作助手写篇文章吧