当我尝试解析日期时,就像这样:
它能正常运行,但当我像这样做时:
我遇到了这个错误:
DateTime t1 = DateTime.ParseExact("August 11, 2013, 11:00:00 PM", "MMMM dd, yyyy, hh:mm:ss tt", System.Globalization.CultureInfo.InvariantCulture);
它能正常运行,但当我像这样做时:
string s ="August 11, 2013, 11:00:00 PM";
DateTime t = DateTime.ParseExact(s, "MMMM dd, yyyy, hh:mm:ss tt", System.Globalization.CultureInfo.InvariantCulture);
我遇到了这个错误:
在用户代码中未能处理的“System.FormatException”类型的异常在 mscorlib.ni.dll 中发生。
var newstr = new string(s1.Where(c => c <128).ToArray())
-> @AhmedEmadvar newstr = new string(s1.Where(c => c <128).ToArray())
- I4VDateTime.ParseExact(s, "\u200EMMMM \u200Edd, \u200Eyyyy, \u200F\u200Ehh:mm:ss tt", CultureInfo.InvariantCulture)
。 - Jeppe Stig Nielsen