Menu
Amazon Redshift
Database Developer Guide (API Version 2012-12-01)

TIMESTAMP_CMP_TIMESTAMPTZ Function

TIMESTAMP_CMP_TIMESTAMPTZ compares the value of a time stamp expression with a time stamp with time zone expression. If the time stamp and time stamp with time zone values are identical, the function returns 0. If the time stamp is greater alphabetically, the function returns 1. If the time stamp with time zone is greater, the function returns –1.

Syntax

Copy
TIMESTAMP_CMP_TIMESTAMPTZ(timestamp, timestamptz)

Arguments

timestamp

A TIMESTAMP column or an expression that implicitly converts to a time stamp.

timestamptz

A TIMESTAMP column or an expression that implicitly converts to a time stamp with a time zone.

Return Type

INTEGER

On this page: