格式异常由用户代码处理...字符串未被识别为有效的日期时间.. [英] format exception was handled by user code...string was not recognised as a valid Date Time..
问题描述
格式异常由用户代码处理...字符串未被识别为有效日期时间..现在出现此错误..
string [] a = new string [] {dd / MM / yyyy,MM / dd / yyyy,MM / dd / yy,ddMMMyyyy,dMMMyyyy,dd-MM -yyyy,MM-dd-yy,MMM dd};
result = DateTime.ParseExact(dateString,a,System.Globalization.CultureInfo.CurrentCulture,System.Globalization.DateTimeStyles。没有);
任何人都可以帮助我..
format exception was handled by user code...string was not recognised as a valid Date Time..i m getting this error..
string[] a = new string[] { "dd/MM/yyyy", "MM/dd/yyyy", "MM/dd/yy", "ddMMMyyyy", "dMMMyyyy","dd-MM-yyyy","MM-dd-yy","MMM dd" };
result = DateTime.ParseExact(dateString, a, System.Globalization.CultureInfo.CurrentCulture, System.Globalization.DateTimeStyles.None);
can anyone help me pls..
推荐答案
错误是用简单的英语写的。你觉得这意味着什么? dateString不是有效的日期时间。
The error is written in plain english. What do you think it means ? dateString is not a valid date time.
这篇关于格式异常由用户代码处理...字符串未被识别为有效的日期时间..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!