Send feedback on this topic.
Teradata.Client.Provider
Parse(String) Method



Teradata.Client.Provider Namespace > TdIntervalYear Structure : Parse(String) Method
A string to be converted into a TdIntervalYear.
The specified string is converted into an equivalent TdIntervalYear.
The specified string is converted into an equivalent TdIntervalYear interval.
Syntax
'Declaration
 
Public Shared Function Parse( _
   ByVal value As String _
) As TdIntervalYear
'Usage
 
Dim value As String
Dim value As TdIntervalYear
 
value = TdIntervalYear.Parse(value)
public static TdIntervalYear Parse( 
   string value
)
public:
static TdIntervalYear Parse( 
   String^ value
) 

Parameters

value
A string to be converted into a TdIntervalYear.

Return Value

A TdIntervalYear is returned that is equivalent to the TdIntervalYear contained in the input string.
Exceptions
ExceptionDescription
The parameter value cannot be converted into a TdIntervalYear interval.
The parameter value is a null reference.
The resultant operation returns a value greater than the TdIntervalYear.MaxValue or less than the TdIntervalYear.MinValue.
Remarks

This method supports the following string formats:

String Format Description
General interval format.

[sign][years]

SQL literal format. This string may be used in a SQL statement.

INTERVAL [sign]'[years]' YEAR

Below is the description of each format item.

Format Element Description
sign If negative a minus sign will be displayed.
years The number of years (one to four digits in length).

Cultural settings are not supported.

While parsing the value the TdIntervalYear.Precision will be set to the number of digits contained within the TdIntervalYear.Years component.

For example a value of "222" will contain 222 years and a precision of 3.

Requirements

Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019

See Also

Reference

TdIntervalYear Structure
TdIntervalYear Members