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



Teradata.Client.Provider Namespace > TdPeriodTime Structure : TryParse Method
The string that contains the TdPeriodTime representation.
The TdPeriodTime representation of the period contained in the specified string.
The specified string is converted into an equivalent TdPeriodTime.
Syntax
'Declaration
 
Public Shared Function TryParse( _
   ByVal value As String, _
   ByRef result As TdPeriodTime _
) As Boolean
'Usage
 
Dim value As String
Dim result As TdPeriodTime
Dim value As Boolean
 
value = TdPeriodTime.TryParse(value, result)
public static bool TryParse( 
   string value,
   out TdPeriodTime result
)
public:
static bool TryParse( 
   String^ value,
   [Out] TdPeriodTime result
) 

Parameters

value
The string that contains the TdPeriodTime representation.
result
The TdPeriodTime representation of the period contained in the specified string.

Return Value

A Boolean is returned that indicates whether the conversion succeeded. true indicates that the conversion was successful and that the conversion is returned through the result parameter. false indicates that the conversion failed.
Remarks

TryParse is the same as Parse except that an exception does not get thrown when the conversion fails.

A period will have the following string representation:

(Beginning Time, Ending Time)

The period must be surrounded by parentheses. Both the Beginning and Ending bounds can optionally be surrounded by single quotes (" ' "). The exception to this is when the Teradata literal string representation of period is specified. The comma (" , ") is used as the delimeter between the Begin and End bounds.

Refer to TdPeriodTime.ToString for valid formats for TdPeriodTime.

If value is null or String.Empty, a false is returned and the result parameter is set to TdPeriodTime.MinValue.

If the conversion fails the result parameter will be set to TdPeriodTime.MinValue.

Requirements

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

See Also

Reference

TdPeriodTime Structure
TdPeriodTime Members
Parse Method
TryParse(String,TdTime) Method
ToString(String) Method