Table of Contents

Method ToString

Namespace
MongoDB.Driver.Linq
Assembly
MongoDB.Driver.dll

ToString(DateTime, string, string)

Converts a DateTime value to a string.

public static string ToString(this DateTime @this, string format, string timezone)

Parameters

this DateTime

The DateTime value.

format string

The format string (optional, can be null).

timezone string

The timezone to use in the returned string (optional, can be null).

Returns

string

The DateTime value converted to a string.