IAFTimePeriod.SetStartTime 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 started.
Namespace: OSIsoft.AF.Time
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
void SetStartTime( Object startTime )
Sub SetStartTime ( startTime As Object ) Dim instance As IAFTimePeriod Dim startTime As Object instance.SetStartTime(startTime)
void SetStartTime( Object^ startTime )
abstract SetStartTime : startTime : Object -> unit
Parameters
- startTime
- Type: SystemObject
The new start 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.
Remarks
When you change the value of the start time, the new value must always be earlier than the EndTime.
Setting the start time will not automatically capture attribute values. To capture values, you must call the CaptureValues method. If the attribute values are captured, then modifying the start time will update the cached values.