更新时间:2022-06-02 08:46:47
您可以尝试将两个时间戳相减,然后使用 to_char
提取出时间部分:
You can try just subtracting the two timestamps, then using to_char
to extract out the time portion:
select
SELECT to_char('2017-11-02 07:36:18'::timestamp -
'2017-11-02 05:51:10'::timestamp, 'HH:MI:SS');
输出:
to_char
01:45:08