PERIOD_CONSTRUCT

functionsupportedCore SQL functions

docs.snowflake.com ↗

Period functions

Constructs a PERIOD value from a beginning bound and an ending bound of the same temporal element type.

Syntax

PERIOD_CONSTRUCT( <begin>, <end> )

Parameters

NameRequiredDescription
beginrequiredThe inclusive beginning bound. Must be a DATE, TIME, TIMESTAMP_NTZ, TIMESTAMP_LTZ, or TIMESTAMP_TZ value.
endrequiredThe exclusive ending bound. Must have the same logical type as begin.

Returns

A PERIOD value whose element type matches the type of the input bounds. For TIME and TIMESTAMP inputs, the result scale is the maximum of the input scales.

Usage notes

See also