DAYS_BETWEEN
Description
Returns the number of days between two provided Dates. The result is positive if end_date occurs after start_date, negative if it occurs before, and zero if the dates are identical.
Syntax
DAYS_BETWEEN(start_date, end_date) -> Integer
Parameters
| Parameter | Data Type | Required | Description |
|---|---|---|---|
| start_date | Date | Yes | The starting Date. |
| end_date | Date | Yes | The ending Date. |
Examples
DAYS_BETWEEN(DATE(2024, 1, 1), DATE(2024, 1, 10))
-- Returns 9.DAYS_BETWEEN(DATE(2024, 1, 10), DATE(2024, 1, 1))
-- Returns -9.DAYS_BETWEEN(StartDate, CloseDate)
-- Returns the number of days between StartDate and CloseDate.