【发布时间】:2017-03-18 15:43:44
【问题描述】:
OleDbCommand command3 = new OleDbCommand();
command3.Connection = connection;
command3.CommandText = "INSERT into AddLoad(ID_Number,Load_Added,Load_Date) values (@ID_Number, @Load_Added,@Load_Date)";
command3.Parameters.AddWithValue("@ID_Number",UserControl_AddLoadConfirmation.INumberValue);
command3.Parameters.AddWithValue("@Load_Added",addbalance);
command3.Parameters.AddWithValue("@Load_Date",DateTime.Now.ToString());
command3.ExecuteNonQuery();
我尝试将 ms access 数据库中日期列 (Load_Date) 的格式更改为“短日期”格式,当我查看我的 Datagrid 中的所有数据时,它仍然带有hour:minute format。
我不确定问题可能是这个代码DateTime.Now.ToString()?
【问题讨论】: