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

AF SDK Reference

AFTimeRange.ToString Method (String, IFormatProvider)

AFTimeRange.ToString Method (String, IFormatProvider)

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFTimeRange.ToString Method (String, IFormatProvider)
Returns a String that represents the time range using the specified format and culture-specific information that can be presented to the user.

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

Syntax

public string ToString(
	string format,
	IFormatProvider provider
)
Public Function ToString ( 
	format As String,
	provider As IFormatProvider
) As String

Dim instance As AFTimeRange
Dim format As String
Dim provider As IFormatProvider
Dim returnValue As String

returnValue = instance.ToString(format, 
	provider)
public:
virtual String^ ToString(
	String^ format, 
	IFormatProvider^ provider
) sealed
abstract ToString : 
        format : string * 
        provider : IFormatProvider -> string 
override ToString : 
        format : string * 
        provider : IFormatProvider -> string 

Parameters

format
Type: SystemString
A format string which should contain either a format specifier character or a custom format pattern. For more information, see the summary page for DateTimeFormatInfo in MSDN help. If this parameter is or an empty string, then the general format specifier 'G' is used.
provider
Type: SystemIFormatProvider
An object that supplies culture-specific formatting information. If , then the DateTimeFormatInfo associated with the current culture is used.

Return Value

Type: String
A String that represents the time range using the specified format and culture-specific information that can be presented to the user.

Implements

IFormattableToString(String, IFormatProvider)

Remarks

This is an override of the Object.ToString method which returns the time range in a format that can be presented to the user.

Version Information

AFSDK


See Also

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