The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.



Gets the year represented by this date/time value.

int GetYear( ) const throw( );

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

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.


See the example for GetDay.


Header: atlcomtime.h