Postgresql Interval 转成秒

前端之家收集整理的这篇文章主要介绍了Postgresql Interval 转成秒前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1、select EXTRACT(EPOCH FROM (now() - fg_last_retrive_time)) as diff,fg_last_retrive_status from tg_reader where fg_reader_ip ='128.31.188.46' ;


2、select date_part('epoch',(now() - fg_last_retrive_time),fg_last_retrive_status from tg_reader where fg_reader_ip ='128.31.188.46' ;

原文链接:https://www.f2er.com/postgresql/195559.html

猜你在找的Postgre SQL相关文章