I have the following code.
using System;
using System.Globalization;
class testCompile
{
static void Main(string[] args)
{
CultureInfo provider = CultureInfo.InvariantCulture;
string format = "mm/d/yyyy";
string strInput = "11/5/2010";
string strOutput = DateTime.ParseExact(strInput, format, provider).ToString();
Console.WriteLine("string Looks Like : {0}", strOutput);
}
}
1) If I try to set the format to "mm/dd/yyyy", the above code throws an error at runtime.
2) I am getting an output of 1/5/2010 12:11:00 AM for the above code.
Where exactly is the 12:00:00 AM coming from?
How did Guy Fawkes Day change to 5th of Jan?
Could someone please explain what is going on?