Method ToString
| MongoDB CSharp Driver API Reference (original) (raw)
Namespace
Assembly
MongoDB.Driver.dll
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
string
The format string (optional, can be null).
timezone
string
The timezone to use in the returned string (optional, can be null).
onNull
string
The string to return if the NullableDateTime value is null.
Returns
The NullableDateTime value converted to a string.