Converts this NullableString structure to NullableDateTime.
A new NullableDateTime structure containing the date value represented by this NullableString structure.
This NullableString structure is parsed using the formatting information in a DateTimeFormatInfo initialized for the current culture. This method attempts to parse this NullableString completely and avoid throwing FormatException. It ignores unrecognized data if possible and fills in missing month, day, and year information with the current time. If s contains only a date and no time, this method assumes 12 A.M. Any leading, inner, or trailing white space character is ignored. Parameter s must contain the representation of a date and time in one of the formats described in the DateTimeFormatInfo topic.
Exception Type | Condition |
---|---|
FormatException |
this NullableString structure does not contain a valid
string representation of a date and time.
|
NullableString Class | NullableTypes Namespace | Parse