Send feedback on this topic.
Teradata.Client.Provider
TryParse(String,IFormatProvider,TdDate) Method



Teradata.Client.Provider Namespace > TdDate Structure > TryParse Method : TryParse(String,IFormatProvider,TdDate) Method
The string that contains the date representation.
An IFormatProvider that supplies culture specific information about the format of value.
The TdDate representation of the date contained in the specified string.
A date contained in a string is converted to a TdDate representation.
Syntax
'Declaration
 
Public Overloads Shared Function TryParse( _
   ByVal value As String, _
   ByVal provider As IFormatProvider, _
   ByRef result As TdDate _
) As Boolean
'Usage
 
Dim value As String
Dim provider As IFormatProvider
Dim result As TdDate
Dim value As Boolean
 
value = TdDate.TryParse(value, provider, result)
public static bool TryParse( 
   string value,
   IFormatProvider provider,
   out TdDate result
)
public:
static bool TryParse( 
   String^ value,
   IFormatProvider^ provider,
   [Out] TdDate result
) 

Parameters

value
The string that contains the date representation.
provider
An IFormatProvider that supplies culture specific information about the format of value.
result
The TdDate representation of the date contained in the specified string.

Return Value

A Boolean is returned that indicates the success of the conversion. 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.

Formatting information contained in the DateTimeFormatInfo object is used to parse the string.

If the string is either null or empty, a TdDate.Null is returned in the result parameter.

If the value contains the string "Null" a TdDate.Null will be returned.

If the conversion fails the result parameter will be set to TdDate.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

TdDate Structure
TdDate Members
Overload List
Parse(String,IFormatProvider) Method