Transform year, month and day to an Excel serial date
static long DateToLSerial( int yy, int mm, int dd ); |
Year (eg 1996).
Month (1-12).
Day of month (1-31).
An Excel integer serial date value
This function calls Excel's DATE() function to calculate a serial date from its components.
Because it uses Excel for the transformation, it handles variations in the Excel base date transparently.
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.
Header: xlldate.h