PERIOD_CONTAINS

functionsupportedCore SQL functions

docs.snowflake.com ↗

Period functions

Returns TRUE if a PERIOD contains another PERIOD, or contains a temporal instant of the same element type.

Syntax

PERIOD_CONTAINS has two overloads: one that tests whether a PERIOD contains another PERIOD, and one that tests whether a PERIOD contains a single temporal instant.

PERIOD_CONTAINS( <period1>, <period2> )

PERIOD_CONTAINS has two overloads: one that tests whether a PERIOD contains another PERIOD, and one that tests whether a PERIOD contains a single temporal instant.

PERIOD_CONTAINS( <period>, <value> )

Parameters

NameRequiredDescription
period1requiredThe outer PERIOD value.
period2requiredThe inner PERIOD value. Must have the same element type as period1.
periodrequiredThe PERIOD value to test.
valuerequiredA DATE, TIME, or TIMESTAMP value whose logical type matches the PERIOD element type.

Returns

BOOLEAN.

Usage notes

See also