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

AF SDK Reference

AFTime.GetName Method

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFTime.GetName Method
Gets the culture-specific full time name of the specified invariant time name based on the specified format provider.

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

Syntax

public static string GetName(
	string invariantName,
	IFormatProvider provider
)
Public Shared Function GetName ( 
	invariantName As String,
	provider As IFormatProvider
) As String

Dim invariantName As String
Dim provider As IFormatProvider
Dim returnValue As String

returnValue = AFTime.GetName(invariantName, 
	provider)
public:
static String^ GetName(
	String^ invariantName, 
	IFormatProvider^ provider
)
static member GetName : 
        invariantName : string * 
        provider : IFormatProvider -> string 

Parameters

invariantName
Type: SystemString
The invariant culture name of the time name to be returned based on the specified provider. The invariant name can be either the full or abbreviated name. When there is a conflict (e.g. 'Y' for 'YESTERDAY' or 'YEAR'), the SDK will choose one to return.
provider
Type: SystemIFormatProvider
An object that supplies culture-specific formatting information about the invariantName. If , then CurrentCulture will be used.

Return Value

Type: String
The culture-specific full time name will be returned that corresponds to the specified invariantName based on the specified provider. If a match cannot be found, then will be returned.

Remarks

This method will use the invariantName to find the culture-specific time name based on the specified provider. Time names are used when parsing an AFTime and/or an AFTimeSpan input string (e.g. "Today", "Monday", "Hour", etc.). See the documentation for TryParse(String, AFTime, IFormatProvider, AFTime) for more information.

Version Information

AFSDK


See Also

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