HOURS_BETWEEN
Description
HOURS_BETWEEN
is a row function that calculates the whole number of hours (ignoring minutes, seconds, and milliseconds) between two DATE
values (value1
- value2
).Syntax
HOURS_BETWEEN
(date_1
,date_2
)Return Value
Returns one value per row of type
INTEGER
.Input Parameters
- date_1
- Required. A field or expression of typeDATE.
- date_2
- Required. A field or expression of typeDATE.
Examples
Calculate the number of hours to ship a product by subtracting the value of the
ship_date
field from the order_date
field:HOURS_BETWEEN([ship_date],[order_date])