字符串未被识别为有效日期时间。我的插入数据有这个错误。请帮助我!!! [英] String Was Not Recognized As A Valid Datetime. I Have This Error On My Insert Data.Please Help Me!!!
本文介绍了字符串未被识别为有效日期时间。我的插入数据有这个错误。请帮助我!!!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
DateTime conv = Convert.ToDateTime(e.Row.Cells[3].Text);
string dat = conv.ToString("dd-MMM-yy");
e.Row.Cells[3].Text = dat;
e.Row.Cells[6].Text = dat;
}
if (grdv.Rows.Count > 0)
{
grdv.HeaderRow.Cells[0].Text = "Edit";
grdv.HeaderRow.Cells[1].Text = "Attendance Detail Reference";
grdv.HeaderRow.Cells[2].Text = "Course Detail Reference";
grdv.HeaderRow.Cells[3].Text = "Date Of Attend";
grdv.HeaderRow.Cells[4].Text = "Attendance ";
grdv.HeaderRow.Cells[5].Text = "Reason ";
grdv.HeaderRow.Cells[6].Text = "Last Updated Date";
grdv.HeaderRow.Cells[7].Text = "Last Updated By";
grdv.HeaderRow.Cells[8].Text = "Student id";
}
推荐答案
阅读这个很棒的答案 - 字符串未被识别为有效的DateTime。 [ ^ ]。
Read this awesome answer - String was not recognized as a valid DateTime.[^].
这篇关于字符串未被识别为有效日期时间。我的插入数据有这个错误。请帮助我!!!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文