CTime::GetDay

Returns the day represent by the CTime object.

int GetDay( ) const throw( );

Return Value

Returns the day of the month, based on local time, in the range 1 through 31.

Remarks

This function calls GetLocalTm, which uses an internal, statically allocated buffer. The data in this buffer is overwritten because of calls to other CTime member functions.

Example

// Example for CTime::GetDay, CTime::GetMonth, and CTime::GetYear
CTime t(1999, 3, 19, 22, 15, 0); // 10:15 PM March 19, 1999
ATLASSERT(t.GetDay() == 19);
ATLASSERT(t.GetMonth() == 3);
ATLASSERT(t.GetYear() == 1999);

Requirements

Header: atltime.h

See Also

Reference

CTime Class

Hierarchy Chart

CTime::GetDayOfWeek