C#对DateTime类型的操作总结

skylook 3 0 PDF 2020-12-31 11:12:37

一、取某月的后 法一、使用算出该月多少天,年+月+加上多少天即得,举例取这个月的后 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,DtMonth); DtEnd = Convert.ToDateTim

用户评论
请输入评论内容
评分:
暂无评论