
DateTime
alisa525
这个作者很懒,什么都没留下…
展开
-
c# 对时间的处理 判断日期差
string time1 = DateTime.Now.TimeOfDay.ToString();// 20:38:58.7149030 string time2 = DateTime.Now.ToLocalTime().ToString();//2009-3-3 20:38:58 string time3 = DateTime.Now.ToLongTime转载 2012-03-13 10:38:14 · 5142 阅读 · 0 评论 -
日期控件显示年月日及时分秒
1、首先把Format 属性设置为 DateTimePickerFormat.Custom,CustomFormat 属性才能影响显示的日期和时间的格式设置。 2、再把CustomFormat属性设置为 yyyy-MM-dd HH:mm:ss 24制小时显示 yyyy-MM-dd hh:mm:ss 12制小时显示原创 2012-03-12 15:10:00 · 3899 阅读 · 0 评论 -
获取一个月的第一天及最后一天
string strYear = cboYear.Text.Trim(); string strMonth = cboMonth.Text.Trim(); DateTime dt = Convert.ToDateTime(strYear + "-" + strMonth); DateTime d1 = new DateT原创 2012-03-26 16:09:59 · 3253 阅读 · 0 评论