Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

postgresql get difference in hours between two dates

select EXTRACT(
	EPOCH FROM now() - (now() - INTERVAL '5 HOUR')
)/3600

-- it will return 5
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #postgresql #difference #hours #dates
ADD COMMENT
Topic
Name
4+1 =