XLL+ Class Library (7.0)

CXlFuncs::Hour

Returns the hour for a particular date value

static int Hour(
   double& dhour,
   double serial_number
);
static int Hour(
   long& lhour,
   double serial_number
);
static int Hour(
   short int& shhour,
   double serial_number
);

Parameters

dhour

A reference to a value that will contain an hour value (between 0 and 23) if the function succeeds.

serial_number

An Excel date/time value. The date (integer) part will be ignored.

lhour

A reference to a value that will contain an hour value (between 0 and 23) if the function succeeds.

shhour

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