Find difference between timestamps in seconds in PostgreSQL November 12, 2022 by Tarik Try: SELECT EXTRACT(EPOCH FROM (timestamp_B - timestamp_A)) FROM TableA Details here: EXTRACT.