XLL+ Class Library (7.0)

::XlStringToSerial

Transform a string to a serial date

int XlStringToSerial(
   const char* str,
   double* date
);
int XlStringToSerial(
   const wchar_t* str,
   double* date
);

Parameters

str

A string containing a date. Excel will use the date formatting rules currently in force to read the string.

date

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

Return Value

1 if the function succeeds; 0 if it fails

Remarks

This function calls Excel's DATEVALUE() function to transform a string date into 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