Skip to main content
Determines if a date is within a specified date range in a previous time period. Category: date Syntax:
InPriorDateRange([date_column], "range_period", "prior_period", |offset|, |today|)
Returns: BooleanColumn Context Filtering: ✓ Yes

Parameters

NameTypeRequiredDescription
date columncolumn|datetime✓ YesThe date to be evaluated.
range periodtext✓ YesThe period for the date range.
prior periodtext✓ YesThe period used to offset the range period.
offsetnumber✗ NoNumber of prior periods to offset by. Defaults to 1.
todaycolumn|datetime✗ NoOverride value for Today when calculating relative to current date.
Allowed Values for range period: year, quarter, month, week, day, hour, minute, second Allowed Values for prior period: year, quarter, month, week, day, hour, minute, second Allowed Column Types: DATETIME, DATE

Validation

  • Minimum parameters: 3
  • Maximum parameters: 5

Examples

InPriorDateRange([Date], "hour", "day")
Returns True for all dates in the current hour of the day in the previous day.
InPriorDateRange([Date], "month", "year")
Returns True for all dates in this month last year.
InPriorDateRange([Date], "month", "year", 2)
Returns True for all dates in this month two years ago.
Last modified on March 13, 2026