DATE_COMPARE

The date function is used to compare one date or time value to another. It returns an integer value of 1 if the first value is after the second value, -1 if the first value is before the second value, and 0 if the two values are equal.