string DateTimeValue = "12/10/2011 12:15:12"; DateTime myDateTime = DateTime.Parse(DateTimeValue); Console.WriteLine("{0:yyyy-MM-dd}", myDateTime);输出:2011-12-10