在Postgresql上,我想取得两个时间的差值(以秒为单位),方法如下:
SELECT a.*,
Extract( epoch from (a.start_time - '#ivr_start#')) as gap
FROM ivr_detail_log a
WHERE callerid = '#callerid#'
AND
abs(Extract( epoch from (a.start_time - '#ivr_start#')))<20
ORDER BY id
|----------------------------------------------------------------------------------------|
版权声明 版权所有 @zhyiwww
引用请注明来源 http://www.blogjava.net/zhyiwww
|----------------------------------------------------------------------------------------|
posted on 2009-07-22 17:33
zhyiwww 阅读(1630)
评论(0) 编辑 收藏 所属分类:
database 、
Postgres