Click or drag to resize

EAPConvertTryParseDateTime Method

Converts the specified string representation of a date and time to its DateTime equivalent using the specified culture-specific format information. Note that if time is provide without a date specification, no default date is supplied. Note also that internal whitespace is ignored. Internally both DateTime.TryParseExact() and DateTime.TryParse() are used to provide wider conversion coverage. This is particularly important for time-only values.

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public static bool TryParseDateTime(
	string s,
	string format,
	CultureInfo culture,
	out DateTime dt
)

Parameters

s
Type: SystemString
The date/time string to parse.
format
Type: SystemString
The optional date/time format specification.
culture
Type: System.GlobalizationCultureInfo
The optional culture for which to parse.
dt
Type: SystemDateTime
The resulting DateTime value, if successful.

Return Value

Type: Boolean
True if successfully converted, else false. Note that blank strings are successfully converted to DateTime.MinValue.
See Also