'VB.NET Dim NextMonth As Integer Dim RptYear As Integer 'Determine next month NextMonth = DatePart(DateInterval.Month, DateAdd(DateInterval.Month, +1, today)) 'Determine the year of the next month, in case you are going from Dec to Jan RptYear = DatePart(DateInterval.Year, DateAdd(DateInterval.Month, +1, today)) 'Subtract 1 day from the first day of next month to get this months last day Return DateAdd(DateInterval.Day, -1, DateValue(NextMonth.ToString & "/1/" & RptYear.ToString))
You need to create an account or log in to post comments to this site.