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

TIMESTAMPTZ_CMP_TIMESTAMP Function

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

Syntax

Copy
TIMESTAMPTZ_CMP_TIMESTAMP(timestamptz, timestamp)

Arguments

timestamptz

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

timestamptz

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

Return Type

INTEGER

On this page: