DateEdit控件的使用
1、将字符串转化为DateTime类型,yyyy-MM-dd HH:mm:ss
string bt = gridView1.GetRowCellValue(index, "BeginTime").ToString(); string begintime1 = (Convert.ToDateTime(bt)).ToString("yyyy-MM-dd HH:mm:ss.fff"); DateTime BeginTime1 = Convert.ToDateTime(begintime1);
2、如何在DateEdit控件上显示精确到时分秒
3、DateTime类型的相加减
DateTime cuttime= ShopDay.AddDays(day).AddHours(hour ).AddMinutes (minute );