Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFTime Constructor (DateTime)

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFTime Constructor (DateTime)
Initializes a new instance of the AFTime structure to the specified DateTime.

Namespace:  OSIsoft.AF.Time
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public AFTime(
	DateTime time
)
Public Sub New ( 
	time As DateTime
)

Dim time As DateTime

Dim instance As New AFTime(time)
public:
AFTime(
	DateTime time
)
new : 
        time : DateTime -> AFTime

Parameters

time
Type: SystemDateTime
The DateTime to be represented. If the Kind is Unspecified the time is treated as Coordinated Universal Time (UTC).

Exceptions

ExceptionCondition
ArgumentOutOfRangeExceptionThrown if the timestamp is between 1/1/1900 and 1/1/1970.

Remarks

Values less than January 1, 1900 will automatically be converted to MinValue. Values between January 1, 1900 and MinValue (January 1, 1970) will generate an ArgumentOutOfRangeException.

Version Information

AFSDK


See Also

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in