XLL+ Class Library (7.0)

CXlFuncs::Year

Returns the year for a date

static int Year(
   double& dyear,
   long serial_number
);
static int Year(
   long& lyear,
   long serial_number
);
static int Year(
   short int& shyear,
   long serial_number
);

Parameters

dyear

A reference to a value that will contain a year number (between 1900 and 9999) if the function succeeds.

serial_number

An Excel serial date value.

lyear

A reference to a value that will contain a year number (between 1900 and 9999) if the function succeeds.

shyear

A reference to a value that will contain a year number (between 1900 and 9999) if the function succeeds.

Return Value

Zero if the function has been called successfully; non-zero if the function could not be called. See Error codes for a list of return values.

Remarks

See the Microsoft Excel on-line Help for full details about this function.

Requirements

Header: xlfuncs.h

See Also

CXlFuncs Class | CXlFuncs Methods