Share via


COleDateTimeSpan::m_status

This data member contains the status of this COleDateTimeSpan object, using one of the COleDateTimeSpan::DateTimeSpanStatus enumerated values.

DateTimeSpanStatus m_status; 

Remarks

The enumerated type DateTimeSpanStatus 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:

  • COleDateTimeSpan::valid   Indicates that this COleDateTimeSpan object is valid.
  • COleDateTimeSpan::invalid   Indicates that this COleDateTimeSpan object is invalid; that is, its value may be incorrect.
  • COleDateTimeSpan::null   Indicates that this COleDateTimeSpan object is null, that is, that no value has been supplied for this object. This is null in the database sense of having no value, as opposed to the C++ NULL.

The status of a COleDateTimeSpan object is invalid in the following cases:

  • If this object has experienced an overflow or underflow during an arithmetic assignment operation, namely, += or -=.
  • If an invalid value was assigned to this object.
  • If the status of this object was explicitly set to invalid using SetStatus.

For more information about the operations that may set the status to invalid, see COleDateTimeSpan::operator +, - and COleDateTimeSpan::operator +=, -=.

Caution   This data member is for advanced programming situations. You should use the inline methods GetStatus and SetStatus. See SetStatus for further cautions regarding explicitly setting this data member.

Requirements

**  Windows CE versions:** 2.0 and later  
  Header file: Declared in Afxdisp.h
  Platform: H/PC Pro, Palm-size PC, Pocket PC

See Also

COleDateTimeSpan::DateTimeSpanStatus, COleDateTimeSpan::GetStatus, COleDateTimeSpan::SetStatus