Sql数据库时间和当前时间格式后比较是否相等

select count(v.ID) as TodayCount,c.Name,c.VoteCount,c.trabeType,c.Number 
from vote v,CMS_U_Vote c
where v.ID=c.ID and (Select CONVERT(varchar(100),v.VoteTime, 23)) =(Select CONVERT(varchar(100), getdate(), 23))
group by v.ID,c.NAME,c.VoteCount,c.trabeType,c.Number

 

posted @ 2012-08-26 21:40  90后1场梦  阅读(581)  评论(0编辑  收藏  举报