XLL+ Class Library

::XlStringToSerial

Transform a string to a serial date

[C++]
int XlStringToSerial(
   const char* 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