A temporal value can be converted into a compatible type using the notation CAST(ttype1 AS ttype2)
or ttype1::ttype2
.
Convert a temporal value to a timestamptz span
ttype::tstzspan
SELECT tint '[1@2001-01-01, 2@2001-01-03]'::tstzspan; -- [2001-01-01, 2001-01-03] SELECT ttext '(A@2001-01-01, B@2001-01-03, C@2001-01-05]'::tstzspan; -- (2001-01-01, 2001-01-05] SELECT tgeompoint '[Point(1 1)@2001-01-01, Point(3 3)@2001-01-03]'::tstzspan; -- [2001-01-01, 2001-01-03]