-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