days_to

Returns the number of days between two dates or times in Salesforce Spiff.

Required Editions

Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience
Available in: Enterprise, Unlimited, and Developer Editions
Available for an additional cost in: Professional Edition with Web Services API Enabled

Syntax

days_to(start_date, end_date)

Arguments

Argument Required? Description
start_date Required The lower bound of the date range. This argument supports any date functions.
end_date Required The upper bound of the date range. This argument supports any date functions.

Example

Return the number of days between a deal's close date and the last day of the calendar year.

=days_to(CloseDate, date("2024-12-31"))