Skip to content

Between Times Best Practices

Guidelines for getting reliable signal from Between Times checks while keeping the noise (and the maintenance) low.

Remember both edges are inclusive

A value landing exactly on Min or Max passes, always. When the window must exclude one of its edges (a period that ends the instant the next one begins), express it with the strict After Date Time and Before Date Time pair rather than assuming this check will exclude it. Shifting the boundary by a whole second or day only reproduces an exclusive edge on a column that is no more precise than the step you take.

Enter the boundaries as unambiguous instants

Both boundaries are stored in UTC and the comparison runs in UTC. When the source data was written in a local time zone, normalize the field upstream with a Computed Field, otherwise a window that looks right can be off by the offset at both ends.

Use Between Times for a fixed window, single-sided rules for open ends

Between Times always evaluates both sides. When only one side is a real rule, After Date Time or Before Date Time states the intent more clearly, and both are strict rather than inclusive. Use Not Future when the ceiling is "now" and should move with the clock.

Pair with Not Null when the date is mandatory

NULL values pass. Between Times asserts that present values fall inside the window; it does not require the field to be populated. When the date must also exist, add a Not Null check on the same field.

Revisit windows that track a period

A window pinned to a quarter or a campaign goes stale the moment the next period starts. Either schedule the edit as part of closing the period, or express the rule with a filter and a moving boundary instead of hardcoding dates that nobody remembers to update.

Keep coverage at 100% unless a known backlog exists

At 100% coverage every failing row is reported as a Record Anomaly, which tells you exactly which dates fall outside the window. Below 100% the check reports a single Shape Anomaly only when the failing fraction crosses the tolerance, and no per-row detail is produced.

Scope with a filter instead of loosening coverage

When a window only applies to part of the table (one period, one region, one contract), express that with a filter clause rather than by lowering coverage. The filter removes the out-of-scope rows from evaluation entirely, and the expression is echoed in every anomaly message.

Route the anomalies to the right people

A date outside its window usually comes from a form default, a back-dated correction, or a job that ran late. Set an Anomaly Assignee from the team that owns that process, and tag the check (period, plausibility) so related checks are easy to find.

See Also