Calendar ToDateTime is not culture aware : Calendar : Development Class C# Source Code


Custom Search

C# Source Code » Development Class » Calendar »

 

Calendar ToDateTime is not culture aware








    


    using System;
    using System.Globalization;

  class Class1
  {
    static void Main(string[] args)
    {
      Calendar MyCalendar = new  GregorianCalendar();
      CultureInfo MyCulture = new CultureInfo("es-ES");
      DateTime MyDate = new DateTime(2006,8,22,15,30,0,0);

      //
      Console.WriteLine(MyCalendar.ToDateTime(MyDate.Year, 
                MyDate.Month, 
                MyDate.Day, 
                MyDate.Hour, 
                MyDate.Minute, 0, 0));
    }
  }

           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Development Class
» Calendar