Parse a date with CultureInfo : Calendar I18N « Date Time « C# / CSharp Tutorial






using System;
using System.Globalization;

public class Example
{
   public static void Main()
   {
      CultureInfo MyCultureInfo = new CultureInfo("de-DE");
      string MyString = "12 Juni 2008";
      DateTime MyDateTime = DateTime.Parse(MyString, MyCultureInfo);
      Console.WriteLine(MyDateTime);
   }
}








13.8.Calendar I18N
13.8.1.Gets the Calendar instance associated with a CultureInfo.
13.8.2.Samples JulianCalendar
13.8.3.IsLeapMonth() for KoreanCalendar
13.8.4.Creates and initializes a JulianCalendar
13.8.5.Use standard en-US date and time value to do Date time parse
13.8.6.Displays the value of the CurrentEra property with GregorianCalendar.CurrentEra
13.8.7.Samples ThaiBuddhistCalendar
13.8.8.Gets the Calendar instance associated with a CultureInfo
13.8.9.Parse a date with CultureInfo
13.8.10.GetWeekOfYear varies depending on the FirstDayOfWeek and the CalendarWeekRule used.
13.8.11.Call GetDaysInMonth for the second month in each of five years in each era.
13.8.12.For each calendar, displays the current year, the number of months in that year, and the number of days in each month of that year.