Table of Contents

Method ToString

Namespace
MongoDB.Driver.Linq
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

string

The NullableDateTime value converted to a string.