C# DateTime ToLongDateString() Method

Beginner
5 min read
Updated: Nov 2026
3 examples
DateTime

Definition

In C#, DateTime.ToLongDateString() returns the date in a long, readable shape that includes the weekday and the month name, such as Wednesday, 18 November 2026.

The exact shape and the language come from the current culture. It equals ToString("D"). The time part is not shown.

This is an instance member of System.DateTime. You call it on a DateTime value, such as dt.ToLongDateString(...). DateTime is a struct, so every value is copied and never changed in place.

Syntax

Call it on a DateTime. It takes no arguments.

C#
CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
DateTime dt = new DateTime(2026, 11, 18, 14, 30, 45);
string s = dt.ToLongDateString();   // "Wednesday, 18 November 2026"
CallWhat it does
dt.ToLongDateString()Long date in the current culture.
dt.ToString("D")The same result using a format letter.
dt.ToString("D", culture)Long date for a chosen culture.

Month and day names are translated by the culture. Use ToString("D", culture) when you want a culture for just one call.

Library declarations
C#
public string ToLongDateString();

Parameters

ParameterDescription
NoneToLongDateString() takes no parameters.

Return Value

Return ValueDescription
stringThe long date pattern of the current culture, with weekday, day, month name, and year.

C# Examples

Example 1 — Long Date, Fixed Culture

Print the long date with the invariant culture.

C#
using System;
using System.Globalization;

class Program {
    static void Main() {
        CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
        DateTime dt = new DateTime(2026, 11, 18, 14, 30, 45);
        Console.WriteLine(dt.ToLongDateString());
    }
}

How It Works

  1. Invariant culture. It uses English names with the pattern dddd, dd MMMM yyyy.
  2. Weekday. November 18, 2026 is a Wednesday, and the method adds that for you.
  3. Month name. The month is spelled out, not shown as a number.
  4. No time. The 14:30:45 part is not part of the long date.

Example 2 — French and German

Switch the current culture and compare with the D format.

C#
using System;
using System.Globalization;

class Program {
    static void Main() {
        DateTime dt = new DateTime(2026, 11, 18);

        CultureInfo.CurrentCulture = new CultureInfo("fr-FR");
        Console.WriteLine(dt.ToLongDateString());
        Console.WriteLine(dt.ToLongDateString() == dt.ToString("D"));

        CultureInfo.CurrentCulture = new CultureInfo("de-DE");
        Console.WriteLine(dt.ToLongDateString());
    }
}

How It Works

  1. French. The weekday and month names are French and there is no comma.
  2. Same as "D". The comparison prints True because both calls use the same pattern.
  3. German. After switching the culture the same code prints Mittwoch, 18. November 2026.
  4. Code unchanged. Only the current culture changed; the method call stayed the same.

Example 3 — Time Does Not Matter

Show that different times give the same text and format a leap day.

C#
using System;
using System.Globalization;

class Program {
    static void Main() {
        CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
        DateTime early = new DateTime(2026, 11, 18, 0, 0, 0);
        DateTime late = new DateTime(2026, 11, 18, 23, 59, 59);
        Console.WriteLine(early.ToLongDateString() == late.ToLongDateString());
        Console.WriteLine(new DateTime(2028, 2, 29).ToLongDateString());
    }
}

How It Works

  1. Start and end of day. One value is midnight and the other is one second before midnight.
  2. Equal text. Both belong to the same day, so the long dates match and the line prints True.
  3. Leap day. February 29, 2028 is a valid date, since 2028 is a leap year.
  4. Weekday computed. You do not pass a weekday; the type knows it is a Tuesday.

Frequently Asked Questions

The date with weekday, day, month name, and year, such as Wednesday, 18 November 2026, in the current culture.
Yes. Both use the long date pattern of the current culture.
No. Use ToLongTimeString or a custom format if you also need the time.
The current culture decides the language and layout of names.
No. It contains spaces and commas and changes with the culture. Use yyyy-MM-dd instead.

Next: ToLongTimeString()

Get the time of day as long text (hours, minutes, seconds) in the current culture with System.DateTime.

ToLongTimeString() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

9 people found this page helpful