XLL+ Class Library (6.3)

CXlFuncs::Weekday

Returns the day of the week corresponding to a date

static int Weekday(
   double& dday,
   long serial_number,
   short int return_type = 1
);
static int Weekday(
   long& lday,
   long serial_number,
   short int return_type = 1
);
static int Weekday(
   short int& shday,
   long serial_number,
   short int return_type = 1
);

Parameters

dday

A reference to a value that will contain a day number (between 0 and 7) if the function succeeds.

serial_number

An Excel serial date value.

return_type

A number that determines the type of return value.

lday

A reference to a value that will contain a day number (between 0 and 7) if the function succeeds.

shday

A reference to a value that will contain a day number (between 0 and 7) 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