DATE_CMP_TIMESTAMPTZ function - Amazon Redshift

DATE_CMP_TIMESTAMPTZ function

DATE_CMP_TIMESTAMPTZ compares a date to a timestamp with time zone. If the date and timestamp values are identical, the function returns 0. If the date is greater alphabetically, the function returns 1. If the timestamp is greater, the function returns –1.

Syntax

DATE_CMP_TIMESTAMPTZ(date, timestamptz)

Arguments

date

A DATE column or an expression that implicitly converts to a date.

timestamptz

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

Return type

INTEGER