EndTime Property (AppointmentItem Object)

Exchange Server 2003

Topic Last Modified: 2004-06-09

The EndTime property returns or sets the ending date/time of this appointment. Read/write.


Variant (vbDate format)

The EndTime property uses both the date and the time component of the vbDate format. Its default value is the current time rounded up to the next half hour.

The EndTime property ignores seconds and truncates the time component to the minute.

The value of EndTime must be greater than that of the StartTime property. If you make settings that violate this constraint, your next call to the Update method returns CdoE_INVALID_OBJECT.

If you change the value of EndTime, Duration is automatically recalculated from the new EndTime and unchanged StartTime values.

You can apply a MessageFilter object to a Messages collection containing AppointmentItem objects and filter them on the StartTime and EndTime properties. The filter passes appointments starting on or before the date/time in CdoPR_START_DATE and ending on or after the date/time in CdoPR_END_DATE.

If you make this appointment recurring by calling its GetRecurrencePattern method, its StartTime, EndTime, and AllDayEvent properties are disabled, and any attempt to access them returns CdoE_NO_SUPPORT. Calling ClearRecurrencePattern returns the appointment to nonrecurring status, and these properties can once again be accessed. However, their values may have changed if the corresponding properties on the RecurrencePattern object were edited while the appointment was recurring.

The appointment's StartTime and EndTime properties are always held internally in UTC (Coordinated Universal Time, also known as GMT). By contrast, the RecurrencePattern object's StartTime and EndTime properties are always held internally in the organizer's current time zone. However, all these properties are converted to the local messaging user's current time zone whenever they are displayed or read programmatically.

Calendar folders are not supported in the public folders store provided with Microsoft® Exchange, and AppointmentItem objects are stored as Message objects. An attempt to read or write EndTime in this case returns CdoE_NO_SUPPORT.

Changes you make to properties on an AppointmentItem object take effect when you call the Send or Update method.

The EndTime property corresponds to the MAPI property PR_END_DATE.