写一段pgsql,计算“排班内的签入时间”和“排班内的签出时间”以秒为单位的时间差
时间: 2023-05-23 15:07:37 浏览: 92
postgreSQL 计算 时间差
SELECT (EXTRACT(EPOCH FROM (shift.end_time - shift.start_time))) AS time_diff
FROM shift
WHERE (NOW() >= shift.start_time) AND (NOW() <= shift.end_time)
阅读全文