DateTime dt = DateTime.Parse("2012-10-12"); Console.WriteLine(dt); dt = DateTime.Parse("2012-10-12 10:22:30");