datediff()获取时间间隔

select datediff(s,voteTime,getDate())

s:时间单位

voateTime:投票的时间(也就是在数据库中给定时间)

getDate():系统当前时间 

你可能感兴趣的:(datediff()获取时间间隔)