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



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

Parameters

value
The string that contains the TdPeriodTimeWithTimeZone representation.
result
The TdPeriodTimeWithTimeZone 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 Bounds, Ending Bounds)

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 TdPeriodTimeWithTimeZone.ToString for valid formats for TdPeriodTimeWithTimeZone.

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

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

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

TdPeriodTimeWithTimeZone Structure
TdPeriodTimeWithTimeZone Members
Parse Method
TryParse(String,TdTimeWithTimeZone) Method
ToString(String) Method