-2
我的日期格式就像是dd/mm/yyyy。当我试图将其转换为datetime我得到这个错误:使用c转换为excel的DateTime#
System.FormatException: Le DateTime représenté par la chaîne n'est pas pris en charge dans le calendrier System.Globalization.GregorianCalendar.
英文错误:
System.FormatException: The datetime represented by the string is not supported in the System.Globalization.GregorianCalendar calendar.
和误差来源是:
devises2.date_observation = DateTime.ParseExact(elements[0],
"dd/MM/yyyy",CultureInfo.InvariantCulture);
你能帮助我吗?
什么是'元素的含量[0]'导致错误? – ryanyuyu
string []元素; – mypeeka
我的意思是'元素[0]'的值是多少?什么是导致错误的特定字符串? – ryanyuyu