Send feedback on this topic.
Teradata.Client.Provider
TryParse Method (TdIntervalYearToMonth)



Teradata.Client.Provider Namespace > TdIntervalYearToMonth Structure : TryParse Method
A string to be converted into a TdIntervalYearToMonth.
The converted string into a TdIntervalYearToMonth.
The specified string is converted into an equivalent TdIntervalYearToMonth.
The specified string is converted into an equivalent TdIntervalYearToMonth interval. A true is returned if the conversion succeeded, false otherwise.
Syntax
'Declaration
 
Public Shared Function TryParse( _
   ByVal value As String, _
   ByRef result As TdIntervalYearToMonth _
) As Boolean
'Usage
 
Dim value As String
Dim result As TdIntervalYearToMonth
Dim value As Boolean
 
value = TdIntervalYearToMonth.TryParse(value, result)
public static bool TryParse( 
   string value,
   out TdIntervalYearToMonth result
)
public:
static bool TryParse( 
   String^ value,
   [Out] TdIntervalYearToMonth result
) 

Parameters

value
A string to be converted into a TdIntervalYearToMonth.
result
The converted string into a TdIntervalYearToMonth.

Return Value

true if the conversion of value succeeded, false otherwise.
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