日期:2014-05-18  浏览次数:20575 次

sql时间查询的问题,
SQL code
select * from VerificationTable  where VerificationStarTime>='2008-07-22' and VerificationStarTime<='2011-12-08 23:59:59'


错误:
消息 241,级别 16,状态 1,第 1 行
从字符串转换日期和/或时间时,转换失败。


咋会这样呢?? 求解救

------解决方案--------------------
SQL code
select * from VerificationTable  
where cast(VerificationStarTime as datetime)>='2008-07-22 00:00:000' 
and cast(VerificationStarTime as datetime)<='2011-12-08 23:59:599