end_of_fiscal_year

Returns the last day of the fiscal year for a specific date or time in Salesforce Spiff. The return format is YYYY-MM-DD. If you haven't specified fiscal year dates in Spiff, this function falls back to a standard calendar year.

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

end_of_fiscal_year(date or time, offset)

Arguments

Argument Required? Description
date_or_time Required The Date or Date & Time value to evaluate. This argument supports any date functions.
offset Optional An integer that overrides the end of the fiscal year by one month. Positive values shift the end forward in time and negative values shift the end back in time.

Example

Return the end of the fiscal year based on the beginning of the statement period, using the BeginningOfPeriod helper function, and adjust the value by one month back in time.

=end_of_fiscal_year(BeginningOfPeriod, -1)