有两个时间字符串,格式分别是 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:ss"); 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:ss");
时间: 2024-11-11 07:30:53