我认为这将是一个非常简单的,我试图用谷歌搜索它,我不断收到异常String was not recognized as a valid DateTime.
这是我的价值"2013-10-21T14:10:49"
这就是我想将它转换成10/21/2013 10:49
string sample = "2013-10-21T14:10:49";
DateTime date31 = DateTime.ParseExact(sample, "MM/dd/yyyy HH:mm", System.Globalization.CultureInfo.InvariantCulture);