Hi folks,
I wanna have a drop down that lets me select "Week Commencing Monday the 20th" going back 10 Mondays but I'm not sure how to go about doing this.
I've used date.now(), etc. before but not sure how to do this one.
Thanks, Billy
UPDATED CODE
Public Sub GetMondays()
Dim dtMondays As New DataTable()
dtMondays.Columns.Add("Date")
Dim i As Integer = 1
While (dtMondays.Rows.Count < 11)
Dim Day As DateTime = Today.AddDays(-i)
If Day.DayOfWeek = 1 Then
dtMondays.Rows.Add(Day)
End If
i += 1
End While
drpDate.DataSource = dtMondays
drpDate.DataBind()
End Sub