Method GetDateTime
GetDateTime(string, DateTimeOffset?, bool)
Converts the specified value to DateTimeOffset. If the value does not exist, the function returns the specified default value. If the value is not convertible, the function throws an InvalidOperationException.
public DateTimeOffset? GetDateTime(string key, DateTimeOffset? defaultValue = null, bool create = false)
Parameters
keystringdefaultValueDateTimeOffset?createbool
Returns
- DateTimeOffset?