无法将类型为"System.Windows.Forms.TextBox"的对象强制转换为类型"System.IConvertible".
DateTimePickerdtp2=newDateTimePicker();dateTimePicker1.Format=DateTimePickerFormat.Lo...
DateTimePicker dtp2 = new DateTimePicker();
dateTimePicker1.Format = DateTimePickerFormat.Long;
DateTime dt2 = Convert.ToDateTime(dtp2);
DateTimePicker dtp3 = new DateTimePicker();
dateTimePicker2.Format = DateTimePickerFormat.Long;
DateTime dt3 = Convert.ToDateTime(dtp3);
TimeSpan ts = dt2 - dt3;
string aw = Convert.ToString(ts.TotalDays);
textBox2.Text = aw; 展开
dateTimePicker1.Format = DateTimePickerFormat.Long;
DateTime dt2 = Convert.ToDateTime(dtp2);
DateTimePicker dtp3 = new DateTimePicker();
dateTimePicker2.Format = DateTimePickerFormat.Long;
DateTime dt3 = Convert.ToDateTime(dtp3);
TimeSpan ts = dt2 - dt3;
string aw = Convert.ToString(ts.TotalDays);
textBox2.Text = aw; 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询