摘要: C#时间处理(DateTime和TimeSpan计算时间差) //取得某月的最后一天 //方法一:使用算出該月多少天,年+月+加上多少天即得,舉例取今天這個月的最后一天 private void GetLastDateForMonth(DateTime DtStart, out DateTime DtEnd) { int Dtyear, DtMonth; DtStart = DateTime.Now; Dtyear = DtStart.Year; DtMonth = DtStart.Month; int MonthCount = DateTime.DaysInMonth(Dtyear, DtM 阅读全文
posted @ 2013-11-21 15:52 关白 阅读(469) 评论(1) 推荐(0) 编辑