periods_ago

Returns the statement period start date that's a specified number of statement periods before another date 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

periods_ago(start_date, number_of_periods)

Arguments

Argument Required? Description
start_date Required The date value to evaluate. This argument supports any date functions. To specify a date as a string in YYYY-MM-DD format, use the date() function and enclose the string in double quotes.
number_of_periods Required An integer that specifies the number of statement periods ahead or behind to find the date for. Positive values count periods in the past, and negative values count periods in the future.

Example

Return the start date of the statement period that's three periods before today's date.

=periods_ago(Now, 3)