Export (0) Print
Expand All

COleDateTime::GetYear

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

Show:
© 2014 Microsoft