仅从gridview中提取日期

时间:2017-04-06 10:50:29

标签: date datetime datagridview

DateTime date = DateTime.ParseExact(dataGridView1.Rows[i].Cells[0].Value.ToString(), "yyyy-MM-dd", System.Globalization.CultureInfo.InvariantCulture);

如何仅从此代码中提取日期?

执行时显示此

An unhandled exception of type 'System.FormatException' occurred in mscorlib.dll

Additional information: String was not recognized as a valid DateTime.

0 个答案:

没有答案