DAYS_BETWEEN
Description
DAYS_BETWEEN
is a row function that calculates the whole number of days
(ignoring time) between two date
values (value1
-
value2
).Syntax
DAYS_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 days to ship a product by subtracting the value of the
order_date
field from the ship_date
field:DAYS_BETWEEN([ship_date],[order_date])
Calculate the number of days since a product's release by subtracting the value of the
release_date
field from the current date (the result
of the TODAY
expression):DAYS_BETWEEN(TODAY(),[release_date])