Hello,
I want to add weeks to todays date. Currently I'm doing this:
startWeek = Date.Now
For i As Integer = 0 To 17
Dim thc As New TableHeaderCell
Dim lblWeekNum As New Label
lblWeekNum.Text = DatePart(DateInterval.WeekOfYear, DateAdd(DateInterval.WeekOfYear, i, startWeek), Microsoft.VisualBasic.FirstDayOfWeek.Monday, FirstWeekOfYear.FirstFourDays)
thc.Controls.Add(lblWeekNum)
thr.Controls.Add(thc)
Next
Now, this is a problem sometimes, as I might actually jump over a week. If Todays date would be 31st of dec and say the first week of next year would only contain 2 days, then I'd skip that week altogether since D ...
Go to the complete details ...