Condividi tramite


COleDateTime::GetYear

Gets the year represented by this date/time value.

int GetYear( ) const throw( );

Return Value

The year represented by the value of this COleDateTime object or COleDateTime::error if the year could not be obtained.

Remarks

Valid return values range between 100 and 9999, which includes the century.

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 Date and Time: Automation Support.

Example

See the example for GetDay.

Requirements

Header: atlcomtime.h

See Also

Reference

COleDateTime Class

Hierarchy Chart

COleDateTime::COleDateTime

COleDateTime::SetDateTime

COleDateTime::operator =

COleDateTime::GetStatus

Other Resources

COleDateTime Members