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



Teradata.Client.Provider Namespace > TdDate Structure > Parse Method : Parse(String,IFormatProvider) Method
The string that is to be converted into a TdDate
An IFormatProvider that supplies culture specific information about the format of value.
The specified string is converted into an equivalent TdDate. The format of the string representation of the date will match the specified culture information.
Syntax
'Declaration
 
Public Overloads Shared Function Parse( _
   ByVal value As String, _
   ByVal provider As IFormatProvider _
) As TdDate
'Usage
 
Dim value As String
Dim provider As IFormatProvider
Dim value As TdDate
 
value = TdDate.Parse(value, provider)
public static TdDate Parse( 
   string value,
   IFormatProvider provider
)
public:
static TdDate Parse( 
   String^ value,
   IFormatProvider^ provider
) 

Parameters

value
The string that is to be converted into a TdDate
provider
An IFormatProvider that supplies culture specific information about the format of value.

Return Value

A TdDate is returned that is equivalent to the Date contained in the value string.
Exceptions
ExceptionDescription
Value is a null reference.
Value does not contain a valid representation of a date.
Remarks

The string is parsed using the culture information contained in the specified Globalization.DateTimeFormatInfo object.

An attempt is made to avoid throwing a FormatException. Any unrecognized characters in the string will be ignored.

However, when a custom culture is used it is possible that the Parse will fail. A date string that contains custom culture specific date elements is very difficult to parse. The string may not match any of the implicit patterns that are used to parse a string.

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

Requirements

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

See Also

Reference

TdDate Structure
TdDate Members
Overload List