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

AF SDK Reference

AFTimeSpan.ToTimeSpan Method

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFTimeSpan.ToTimeSpan Method
Returns the time span as a standard TimeSpan object.

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

Syntax

public TimeSpan ToTimeSpan()
Public Function ToTimeSpan As TimeSpan

Dim instance As AFTimeSpan
Dim returnValue As TimeSpan

returnValue = instance.ToTimeSpan()
public:
TimeSpan ToTimeSpan()
member ToTimeSpan : unit -> TimeSpan 

Return Value

Type: TimeSpan
Returns the time span as a standard TimeSpan object.

Remarks

The span interval is returned as standard TimeSpan object. Since there are a variable number of days in a year or month, an AFTimeSpan defined using these interval values may return unexpected results. A year interval is calculated as 365.25 days and a month interval is calculated as 30 days.

Version Information

AFSDK


See Also

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