有两个时间字符串,格式分别是
string dateEnglish = "1-6-14 8:25";//格式为 月-日-年
string dateFranch = "13-1-14 13:56"; //格式为 日-月-年
IFormatProvider cultureE = new System.Globalization.CultureInfo("en-us", true);
DateTime dt = DateTime.Parse(dateEnglish, cultureE, System.Globalization.DateTimeStyles.NoCurrentDateDefault);
var str1 = dt.ToString("yyyy-MM-dd HH:mm");
IFormatProvider cultureF = new System.Globalization.CultureInfo("fr-FR", true);
DateTime dt2 = DateTime.Parse(dateFranch, cultureF, System.Globalization.DateTimeStyles.NoCurrentDateDefault);
var str2 = dt2.ToString("yyyy-MM-dd HH:mm");
参考:http://msdn.microsoft.com/zh-cn/library/1k1skd40%28VS.80%29.aspx