COleDateTime::GetYear

int GetYear( ) const;

Return Value

The year represented by the value of this COleDateTime object.

Remarks

Call this member function to get the year represented by this date/time value.

Valid return values range between 100 and 9999, which includes the century. If the status of this COleDateTime object is not valid, the return value is AFX_OLE_DATETIME_ERROR.

For information on other member functions that query the value of this COleDateTime object, see the following member functions:

For more information about the bounds for COleDateTime values, see the article in Visual C++ Programmer’s Guide.

Example

See the example for GetDay.

COleDateTime OverviewClass MembersHierarchy Chart

See Also   COleDateTime::COleDateTime, COleDateTime::SetDateTime, COleDateTime::operator =, COleDateTime::GetStatus