Dim d As Date = e.DataRow("日期") Dim y As Integer = d.Year Dim m As Integer = d.Month Dim Days As Integer = Date.DaysInMonth(y,m) Dim fd As Date = New Date(y,m,1) '获得该月的第一天 Dim ld As Date = New Date(y,m,Days)
参考下