void SetStatus( DateTimeSpanStatus nStatus );
Parameters
nStatus
The new status value for this COleDateTimeSpan object.
Remarks
Call this member function to set the status (validity) of this COleDateTimeSpan object. The nStatus parameter value is defined by the DateTimeSpanStatus enumerated type, which is defined within the COleDateTimeSpan class.
enum DateTimeSpanStatus{
valid = 0,
invalid = 1,
null = 2,
};
For a brief description of these status values, see the following list:
Caution This function is for advanced programming situations. This function does not alter the data in this object. It will most often be used to set the status to null or invalid. Note that the assignment operator (operator =) and SetDateTimeSpan do set the status of the object based on the source value(s).
Example
// if the person is still in school, set date
// of graduation to null
if (m_bStillInSchool || m_dtDateOfGraduation.GetStatus() == COleDateTime::null)
m_dtDateOfGraduation.SetStatus(COleDateTimeSpan::null);
COleDateTimeSpan Overview | Class Members | Hierarchy Chart
See Also COleDateTimeSpan::GetStatus, COleDateTimeSpan::m_status