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

ParameterData TypeRequiredDescription
start_dateDateYesThe starting Date.
end_dateDateYesThe 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.

Related Formula