在.net中datetime变量怎么赋值给dateTimePicker控件

2024-11-27 06:54:56
推荐回答(2个)
回答1:

dateTimePicker1.Value = DateTime.Today;

回答2:

objectobj=dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells[4].Value;DateTimetime=Convert.ToDateTime(obj);dateTimePicker.Value=time;