DateTimeFormatInfo.LongDatePattern
using System;
using System.Globalization;
public class Example
{
public static void Main()
{
DateTime date1 = new DateTime(2011, 11, 12);
string[] cultureNames = { "en-US", "fr-FR", "ru-RU", "de-DE" };
foreach (var cultureName in cultureNames) {
CultureInfo culture = CultureInfo.CreateSpecificCulture(cultureName);
Console.WriteLine("{0,-7} {1,-20} {2}",
culture.Name,
culture.DateTimeFormat.LongDatePattern,
date1.ToString("D", culture));
}
}
}
Related examples in the same category