在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.tkk7.com/zhyiwww
|----------------------------------------------------------------------------------------|
posted on 2009-07-22 17:33
zhyiwww 閱讀(1641)
評論(0) 編輯 收藏 所屬分類:
database 、
Postgres