Convert a date to a day of the week
static int XlWeekday( long date );
An integer serial date value.
An integer between 1 (Monday) and 7 (Sunday).
This function calls Excel's WEEKDAY() function with 2 as its second argument.
If a call to the Excel API fails, then an exception of type CXlApiException will be thrown. Since this exception is derived from CXlRuntimeException, it will be caught by the add-in wrapper function when this method is called from within an add-in function.