Type: Function
Function: AFTER_DATE
Syntax: AFTER_DATE(date, other_date, [granularity])
Description: Returns true if the date is after the other date, at the chosen granularity (the day by default).
The granularity is "YEAR", "YEAR_QUARTER", "YEAR_MONTH", "YEAR_WEEK" or "YEAR_MONTH_DAY", in upper or lower case, and defaults to "YEAR_MONTH_DAY". Both dates are compared at that level: by default, a record created at any time of a day matches that day.
AFTER_DATE(date, other_date, "YEAR_MONTH") is the same as GREATER_THAN(YEAR_MONTH(date), YEAR_MONTH(other_date)).
It is the same condition as the After (date) filter of the insight designer (see Using filters). Use it in a custom formula, to count, group or label records on that condition, or as a filter in a query sent through the Keypup API or MCP server.
Sample usage:
AFTER_DATE(created_at, "2026-03-03")returnstrueif the record was created from 4 March 2026 onwards.AFTER_DATE(created_at, "2026-03-01", "YEAR_MONTH")returnstrueif the record was created from April 2026 onwards.
