DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
8+8 =
Submit