-- difference in seconds between two dates select extract(epoch from ('2020-03-30 09:55:56'::timestamp - '2020-03-30 08:54:55'::timestamp)); -- result : 3661