Date_Compare - Compare Two Dates in Informatica

Syntax
DATE_COMPARE( date1, date2 )


If date 1 is earlier than date 2, Infa returns -1 and if date 1 is older than date2 it returns 1. Informatica returns 0 if both the dates are same.

If date 1 or date 2 is NULL, output of date_compare is NULL

Example : Compare Two Dates

DATE_COMPARE ( DATE_SHIPPED , DATE_PROMISED)

DATE_PROMISED         DATE_SHIPPED     RETURN VALUE
Jan 1 2007             Jan 13 2007         -1
Feb 1 2007             Feb 1 2007         0
Dec 22 2007             Dec 15 2007         1