InDateRange
The InDateRange function determines if an inputted date is within a specified range of dates, returning True or False.
Syntax
InDateRange([date column], [direction], [period], [length], [offset], [today])Function arguments:
- date column (required) - The date to be evaluated.
- direction (required) - The direction to apply the date range offset.
- Enter lastto set the date range to the most recent window.
- Enter nextto set the date range to the upcoming window.
- Enter currentto set the date range to the current window.
- Enter to_dateto set the date range to the current window up until the current date.
 
- Enter 
- period (required) - The size of date window
- options: year,quarter,month,week,day,hour,minute, andsecond
 
- options: 
- length (optional) - The number of periods to include in the date range
- If not set, defaults to 1
 
- If not set, defaults to 
- offset (optional) - The number of periods to offset for the start date range
- If not set, defaults to 0
 
- If not set, defaults to 
- today (optional) - The value to use for Today when calculating with respect to the current date
- If not set, defaults to Today()
 
- If not set, defaults to 
Example
Returns True for all dates in the current month:
InDateRange([Date], "current", "month")Returns True for all dates in the last three weeks:
InDateRange([Date], "last", "week", 3)Returns True for all dates in the week starting three weeks ago:
InDateRange([Date], "last", "week", 1, 3)Returns True for all dates within the last year up to today's date:
InDateRange([Date], "to_date", "year", 1, -1)Updated 10 days ago
Related resources
