Method TryParseDateTime
TryParseDateTime(String)
Attempts to parse a string to a Maybe<T> of System.DateTime. If the parse fails (or source
is null) an empty maybe is returned.
Declaration
public static Maybe<DateTime> TryParseDateTime(this string source)
Parameters
Type | Name | Description |
---|---|---|
System.String | source | The string to parse. |
Returns
Type | Description |
---|---|
Maybe<DateTime> | A Maybe<T> containing a valid DateTime value parsed from the string, or an empty maybe instance if the parse failed. |