Skip to main content
Workday User Guide
Last Updated: 2023-06-23
HOURS_BETWEEN

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 type
DATE
.
date_2
Required. A field or expression of type
DATE
.

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])