1. 首页
  2. 数据库
  3. 其它
  4. C#对DateTime类型的操作总结

C#对DateTime类型的操作总结

上传者: 2020-12-31 11:28:37上传 PDF文件 35.58KB 热度 11次
一、取某月的后 法一、使用算出该月多少天,年+月+加上多少天即得,举例取这个月的后 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
下载地址
用户评论