当我将日期分配给textmode =“ date”的textBox时,虽然textBox在调试中具有正确的日期并且启用了autopostBack,但它不会显示并显示“ mm / dd / yyy”。
DataTable dt= DepartMentDB.GetDepartmentById(ddlDepartment.SelectedValue.ToString());
string Managername = dt.Rows[0]["Dept_Manager"].ToString();
DateTime d = DateTime.Parse(dt.Rows[0]["Manager_hiredate"].ToString());
txtHiredate.Text = d.ToString("mm/dd/yyy");
将值转换为DateTime对象
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句