SetEndTime Method (PIBatch Objects)

             

 

The SetEndTime method sets or modifies the end time of the batch object. End time is the time the particular object ended activity.  The end time of a PIUnitBatch should be within the start and end time of its parent PIUnitBatch and within the start and end time of its parent PIBatch; this is not enforced. End time, of course, must be newer than the object’s start time.  The value of the end time is accessed through the EndTime property.

Syntax

object.SetEndTime varEndTime

The SetEndTime method syntax has these parts:

Part

Description

object

An object expression that evaluates to an object in the Applies To list.

varEndTime

A VARIANT representing the end time. See Settings below.

 

Remarks

If this property is not set, that is, the property evaluates to Nothing, the EndTime is implied as current time or the process is still in progress. For example, while a PIUnitBatch is running, the EndTime property is not set. Passing "Nothing" to this method un-sets the end time and the object is implied to be active.

Settings

The possible values in the variant for varEndTime are:

Setting

Description

VT_BSTR

A Variant containing a time/date string (currently in Microsoft formats)

VT_DATE

A Variant containing a DATE representing a local date on the current system

VT_R4,VT_R8,VT_I2, VT_I4

A Variant containing a number representing seconds since 1970 UTC.

VT_DISPATCH, VT_UNKNOWN

A Variant containing a reference to a PITime object

 

Enabling Operational Intelligence