1

我有一个查询,我必须以分钟为单位计算时差,但我也需要秒。那么,我可以在以下查询中使用 6.10 表示 6 分 10 秒吗?或者有什么替代方法可以说明这一点吗?

询问:

select distinct(users) , avisitedDate from visitSearchEngine vs
WHERE vs.users!=' ' 
AND vs.status='0' 
AND vs.hitType='googleIdentified'
AND vs.avisitedDate>'2012-12-06' 
AND ((TIME_TO_SEC(TIMEDIFF(NOW(),vs.avisitedDate)))/60)>=5
AND ((TIME_TO_SEC(TIMEDIFF(NOW(),vs.avisitedDate)))/60)<6.10

请给我建议!

谢谢,

4

1 回答 1

1
select distinct(users) , avisitedDate from visitSearchEngine vs
WHERE vs.users!=' ' 
AND vs.status='0' 
AND vs.hitType='googleIdentified'
AND vs.avisitedDate>'2012-12-06' 
AND TIMEDIFF(NOW(),vs.avisitedDate) >= '00:05:00'
AND TIMEDIFF(NOW(),vs.avisitedDate) < '00:06:10'
于 2012-12-20T12:05:17.990 回答