Jaa


Date.TryParse Method

Definition

Overloads

TryParse(String, Date)

Try converts a specified string representation of a date to Date with CurrentCulture format.

TryParse(String, IFormatProvider, Date)

Try converts a specified string representation of a date to Date

TryParse(String, Date)

Try converts a specified string representation of a date to Date with CurrentCulture format.

public static bool TryParse (string text, out Microsoft.OData.Edm.Date result);
static member TryParse : string * Date -> bool
Public Shared Function TryParse (text As String, ByRef result As Date) As Boolean

Parameters

text
String

A string that represent a date to convert.

result
Date

A Date object equivalent to the date input, if the conversion succeeded or MinValue, if the conversion failed.

Returns

True if the input parameter is successfully converted; otherwise, false.

Applies to

TryParse(String, IFormatProvider, Date)

Try converts a specified string representation of a date to Date

public static bool TryParse (string text, IFormatProvider provider, out Microsoft.OData.Edm.Date result);
static member TryParse : string * IFormatProvider * Date -> bool
Public Shared Function TryParse (text As String, provider As IFormatProvider, ByRef result As Date) As Boolean

Parameters

text
String

A string that represent a date to convert.

provider
IFormatProvider

An object that supplies culture-specific formatting information about text.

result
Date

A Date object equivalent to the date input, if the conversion succeeded or MinValue, if the conversion failed.

Returns

True if the input parameter is successfully converted; otherwise, false.

Applies to