System.DateTime.ToLongDateString Method

Converts the value of the current DateTime object to its equivalent long date string representation.

Syntax

public string ToLongDateString ()

Returns

A string that contains the long date string representation of the current DateTime object.

Remarks

The value of the current DateTime object is formatted using the pattern defined by the System.Globalization.DateTimeFormatInfo.LongDatePattern property associated with the current thread culture. The return value is identical to the value returned by specifying the "D" standard DateTime format string with the DateTime.ToString(string) method.

Note:

The string returned by the DateTime.ToLongDateString method is culture-sensitive. It reflects the pattern defined by the current culture's System.Globalization.DateTimeFormatInfo object. For example, for the en-US culture, the standard long date pattern is "dddd, MMMM dd, yyyy"; for the de-DE culture, it is "dddd, d. MMMM yyyy"; for the ja-JP culture, it is "yyyy'?'M'?'d'?'". The specific format string on a particular computer can also be customized so that it differs from the standard long date format string.

For more information about the current thread culture, see the System.Threading.Thread.CurrentCulture property. For more information about format characters, format patterns, and the output they produce, see the Formatting Types topic. For more information about changing the format pattern associated with a format character, see the System.Globalization.DateTimeFormatInfo class.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0