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

DATE_CMP_TIMESTAMPTZ Function

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

Syntax

Copy
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 time stamp with a time zone.

Return Type

INTEGER