Method ToString
ToString(DateTime?, string, string, string)
Converts a NullableDateTime value to a string.
public static string ToString(this DateTime? @this, string format, string timezone, string onNull)
Parameters
thisDateTime?The NullableDateTime value.
formatstringThe format string (optional, can be null).
timezonestringThe timezone to use in the returned string (optional, can be null).
onNullstringThe string to return if the NullableDateTime value is null.
Returns
- string
The NullableDateTime value converted to a string.