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



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

Parameters

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

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][months]

Teradata literal format. This string may be used in generating SQL against the Teradata database.

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

Target Platforms: Windows 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2

See Also

Reference

TdIntervalMonth Structure
TdIntervalMonth Members