Performs a full date/time comparison of two dates. Returns -1 if date1 is less than date2; returns 0 if date1 is equal to date2; returns 1 if date1 is greater than date2.
Date/time object in the period from 100 AD to 9999 AD.
date2
Date/time object in the period from 100 AD to 9999 AD.
Usage
When passing a date/time value as a string, make sure it is enclosed in quotes. Otherwise, it is interpreted as a number representation of a date/time object, returning undesired results.