XLL+ Class Library (6.3)

::XlDateToSerial

Transform year, month and day to an Excel serial date

int XlDateToSerial(
   double* date,
   int yy,
   int mm,
   int dd
);

Parameters

date

Pointer to a variable which will be filled with a serial date value (as used by Excel).

yy

Year (eg 1996).

mm

Month (1-12).

dd

Day of month (1-31).

Return Value

1 if the function succeeds; 0 if it fails

Remarks

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.

Requirements

Header: xlldate.h

See Also

Global date functions