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

TIMESTAMPTZ_CMP_DATE Function

TIMESTAMPTZ_CMP_DATE compares the value of a time stamp and a date. If the time stamp and date values are identical, the function returns 0. If the time stamp is greater alphabetically, the function returns 1. If the date is greater, the function returns –1.

Syntax

Copy
TIMESTAMPTZ_CMP_DATE(timestamptz, date)

Arguments

timestamptz

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

date

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

Return Type

INTEGER