tryParse¶
Parses the specified string like DateTimeOffset.parse, but returns null when the text is not a valid date, in both server workflow scripts and browser form scripts.
1 | |
Parameters¶
string val
A string representing the date and time.
string format optional
The exact format, as in DateTimeOffset.parse.
Returns¶
The parsed value, or null.
Examples¶
Read an optional date from a request¶
1 2 3 4 5 | |
See Also¶
- ( DateTimeOffset |
null) - DateTimeOffset.parse