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



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

Parameters

value
A string to be converted into a TdIntervalYearToMonth.

Return Value

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

This method supports the following string formats:

String Format Description
General interval format.

[sign][years]-[mm]

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

INTERVAL [sign]'[years]-[mm]' YEARS TO MONTH

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).
mm 2 digits representing the months from 00 - 11.

Cultural settings are not supported.

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

For example a value of "222-10" will contain 222 years, 10 months 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

TdIntervalYearToMonth Structure
TdIntervalYearToMonth Members