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
this
DateTime?The NullableDateTime value.
format
stringThe format string (optional, can be null).
timezone
stringThe timezone to use in the returned string (optional, can be null).
onNull
stringThe string to return if the NullableDateTime value is null.
Returns
- string
The NullableDateTime value converted to a string.