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



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

Parameters

value
The string that contains the TdPeriodTimestamp representation.
result
The TdPeriodTimestamp 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 format:

(Beginning Bound, Ending Bound)

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 timestamps.

Refer to TdPeriodTimestamp.ToString for valid formats for TdPeriodTimestamp.

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

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

Requirements

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

See Also

Reference

TdPeriodTimestamp Structure
TdPeriodTimestamp Members
Parse Method
TryParse(String,TdTimestamp) Method
ToString(String) Method