hours_between() function
The hours_between() function determines the truncated number of full hours between two time stamps.
Syntax
The hours_between() function
has the following
syntax:
int = hours_between(timestamp t1, timestamp t2);
The t1 value
specifies the beginning time stamp.
The t2 value specifies the ending time stamp.
Returns
The function returns the truncated number
of full hours between the
t1 and t2 values.
Example
select hours_between('1996-02-27 06:12:33' , '1996-03-01 07:12:33');
HOURS_BETWEEN
---------------
73
(1 row)