DateCompare()

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

Usage

NUMERIC = DateCompare( date1, date2, datepart )
Argument Summary
date1 date1
date2 date2
datepart date part ('yyyy' year, 'q' quarter, 'm' month, 'y' day of year,'d' days, 'w' week day, 'ww' week of year, 'h' hours, 'n' minutes, 's' seconds, 'l' milliseconds) [optional]

Calling

Supports named-parameter calling allowing you to use the function like:

DateCompare(
   date1=?, 
   date2=?, 
   datepart=?
);

Supports passing parameters as a structure using ArgumentCollection:

DateCompare( ArgumentCollection={
   date1 : ?, 
   date2 : ?, 
   datepart : ?
} );