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



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

Parameters

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

Return Value

true if the conversion of value succeeded, false otherwise.
Remarks

This method supports the following string formats:

String Format Description
G

General interval format.

[sign][seconds].[ffffff]

L

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

INTERVAL [sign]'[seconds].[ffffff]' SECOND

Below is the description of each format item.

Format Item Description
sign Optional - . Defaults as space character (+).
seconds Required number of seconds (one to four digits in length).
ffffff Optionally the number of fractional seconds (0 to 6 digits in length).

Cultural settings are not supported.

While parsing the value the TdIntervalSecond.Precision will be set to the number of digits contained within the second component. The TdIntervalSecond.Scale will be set to the number of digits in the fractional seconds component (digits that are to the right of the decimal point).

For example a value of "40.1234" will contain a precision of 2 and a scale of 4.

Requirements

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

See Also

Reference

TdIntervalSecond Structure
TdIntervalSecond Members