Skip to main content
Determines if a date is within a specified date range. Category: date Syntax:
InDateRange([date_column], "direction", "period", |length|, |offset|, |today|)
Returns: BooleanColumn Context Filtering: ✓ Yes

Parameters

NameTypeRequiredDescription
date columncolumn|datetime✓ YesThe date to be evaluated.
directiontext✓ YesDirection to apply the date range offset.
periodtext✓ YesSize of the date window.
lengthnumber✗ NoNumber of periods to include in the range. Defaults to 1.
offsetnumber✗ NoNumber of periods to offset the start of the range. Defaults to 0.
todaycolumn|datetime✗ NoOverride value for Today when calculating relative to current date.
Allowed Values for direction: last, next, current, to_date Allowed Values for period: year, quarter, month, week, day, hour, minute, second Allowed Column Types: DATETIME, DATE

Validation

  • Minimum parameters: 3
  • Maximum parameters: 6

Examples

InDateRange([Date], "current", "month")
Returns True for all dates in the current month.
InDateRange([Date], "last", "week", 3)
Returns True for all dates in the last three weeks.
InDateRange([Date], "last", "week", 1, 3)
Returns True for all dates in the week starting three weeks ago.
InDateRange([Date], "to_date", "year", 1, -1)
Returns True for all dates within the last year up to today’s date.
Last modified on March 13, 2026