AFTimeRuleEvent.SetEndTime Method
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Set the time that represents the time that the period ended.
Namespace: OSIsoft.AF.Time
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public void SetEndTime( Object endTime )
Public Sub SetEndTime ( endTime As Object ) Dim instance As AFTimeRuleEvent Dim endTime As Object instance.SetEndTime(endTime)
public: virtual void SetEndTime( Object^ endTime ) sealed
abstract SetEndTime : endTime : Object -> unit override SetEndTime : endTime : Object -> unit
Parameters
- endTime
- Type: SystemObject
The new end time for the period. The value may be an AFTime, DateTime, PITime, String, or numeric. A DateTime (or a DATE will be treated as UTC time if its Kind property is set to Unspecified. Because DATE values from COM or VB6 clients are marshalled as Unspecified, these client applications must convert to UTC prior to marshalling. An integer numeric represents the number of ticks (100-nanosecond intervals) since January 1, 0001. A floating point numeric represents the number of seconds since January 1, 1970 UTC. A String is interpreted as local time, unless it contains a time zone indicator such as a trailing "Z" or "GMT". Strings will be interpreted with the AFTime.Parse Overload methods so that relative formats with intervals ("*", "T+3h", etc.) are also supported. Relative time intervals are based on the object's QueryDate.
Implements
IAFTimePeriodSetEndTime(Object)
Remarks
The value of the EndTime property is automatically set by the time rule.
When you change the value of the end time, the new value must
always be later than the StartTime.