Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

postgres date difference seconds

-- 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
 
PREVIOUS NEXT
Tagged: #postgres #date #difference #seconds
ADD COMMENT
Topic
Name
4+4 =