AddIntervals Method (TimeInterval Object)

See Also     Example     Applies To    


Return a local DATE representing the result of adding the passed number of intervals to the passed PITime object.


object.AddIntervals PITIme, nIntervals

The AddIntervals method syntax has these parts:

Part Description
object An object expression that evaluates to an ITimeInterval object.
PITime A PITime object to which the specified intervals are added.
nIntervals A Double, which is the number of intervals to add. May be positive or negative. Although this is a Double, most ITimeInterval objects will only accept integer values.

Trappable Errors

In addition to generic errors (such as Out of Memory), the following errors may occur:

Error Description
tseNAMENOTFOUND The specified interval name was not found.
tseOUTOFRANGE The specified interval index was outside the number of items in the collection.
tseTIMEINVALID The resulting time is out of range.
tseFRACTIONSNOTALLOWED The passed interval does not support fractions.
tseDATEOUTOFRANGE The resulting time is out of range.

Enabling Operational Intelligence