[讨论]为什么显示这个时间?
string cs = "server=localhost;database=maomao;integrated security=SSPI";SqlConnection conn = new SqlConnection(cs);
SqlCommand comm = conn.CreateCommand();
comm.CommandText = "SELECT * FROM 进货表单";
SqlDataAdapter sa = new SqlDataAdapter();
sa.SelectCommand = comm;
DataSet ds = new DataSet();
conn.Open();
sa.Fill(ds,"进货表单");
conn.Close();
DataTable mydatatable=ds.Tables ["进货表单"];
foreach (DataRow mydatarow in mydatatable.Rows)
{
dataGridView1.Rows.Add(mydatarow["商品名称"], mydatarow["进货日期"],
mydatarow["进货数量"], mydatarow["商品单价"], mydatarow["进货支出"]);
}
为什么结果显示的进货日期一列会出现我的计算机名字还有永远不变的0:00:00
进货日期
2006-1-1 毛毛0:00:00