datetime.compare()
Compares to date, to the given optional resolution.
Returns -1 if date1 is before date2. Returns 1 if date1 is after date2. Returns 0 if equal
datetime.compare( date2=datetime, datePart=string )
Returns: Number
Examples
dateTime = now();
writeDump(datetime.compare("11/04/1997"));
dateTimeone = "11/04/1997";
writeDump(dateTimeone.compare("11/04/1997"));
dateTimetwo = "27/10/1996";
writeDump(dateTimetwo.compare(now()));
dateTimet1= createDateTime(1997,04,11,08,10,00);
dateTimet2= createDateTime(1997,04,11,08,15,00);
writeDump(dateTimet1.compare(dateTimet2));