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



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

Parameters

value
A string to be converted into a TdIntervalMonth.

Return Value

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

This method supports the following string formats:

String Format Description
General interval format.

[sign][months]

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

INTERVAL [sign]'[months]' MONTH

Below is the description of each format item.

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

Cultural settings are not supported.

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

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

Requirements
ProductVersionsPlatforms
.NET6, 7Windows, Linux, MacOS
.NET Framework4.6.2, 4.7, 4.7.1, 4.7.2, 4.8Windows
.NET Standard2.0Windows, Linux, MacOS
See Also

Reference

TdIntervalMonth Structure
TdIntervalMonth Members