JsonValueExtensionsGetDateTimeOrDefault Method

Overload List

GetDateTimeOrDefault(JsonValue, JsonValueType) Gets the specified JsonValue as a DateTime value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateTime; otherwise, returns DateTime.MinValue, which is the default value of DateTime. The actual format is attempted to be auto detected. If you know exact format use the other GetDateTimeOrDefault overloads.
GetDateTimeOrDefault(JsonValue, JsonDateTimeFormat, JsonValueType) Gets the specified JsonValue as a DateTime value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateTime; otherwise, returns DateTime.MinValue, which is the default value of DateTime.
GetDateTimeOrDefault(JsonValue, DateTime, JsonValueType) Gets the specified JsonValue as a DateTime value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateTime; otherwise, returns defaultValue. The actual format is attempted to be auto detected. If you know exact format use the other GetDateTimeOrDefault overloads.
GetDateTimeOrDefault(JsonValue, NullableDateTimeKind, JsonValueType) Gets the specified JsonValue as a DateTime value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateTime; otherwise, returns DateTime.MinValue, which is the default value of DateTime. The actual format is attempted to be auto detected. If you know exact format use the other GetDateTimeOrDefault overloads.
GetDateTimeOrDefault(JsonValue, String, NullableDateTimeKind) Gets the specified JsonValue as a DateTime value using the specified format if Type property of the specified json parameter is String and it can be converted to DateTime; otherwise, returns DateTime.MinValue, which is the default value of DateTime.
GetDateTimeOrDefault(JsonValue, JsonDateTimeFormat, DateTime, JsonValueType) Gets the specified JsonValue as a DateTime value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateTime; otherwise, returns defaultValue.
GetDateTimeOrDefault(JsonValue, JsonDateTimeFormat, NullableDateTimeKind, JsonValueType) Gets the specified JsonValue as a DateTime value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateTime; otherwise, returns DateTime.MinValue, which is the default value of DateTime.
GetDateTimeOrDefault(JsonValue, DateTime, NullableDateTimeKind, JsonValueType) Gets the specified JsonValue as a DateTime value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateTime; otherwise, returns defaultValue. The actual format is attempted to be auto detected. If you know exact format use the other GetDateTimeOrDefault overloads.
GetDateTimeOrDefault(JsonValue, String, DateTime, NullableDateTimeKind) Gets the specified JsonValue as a DateTime value using the specified format if Type property of the specified json parameter is String and it can be converted to DateTime; otherwise, returns defaultValue.
GetDateTimeOrDefault(JsonValue, JsonDateTimeFormat, DateTime, NullableDateTimeKind, JsonValueType) Gets the specified JsonValue as a DateTime value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateTime; otherwise, returns defaultValue.

See Also