I am trying loop though this month until past six months using vb.net and get the the month as integer and year only and pass this to my sql statement. but cannot seem to figure it out..
so far i got this :
Dim dtNow As DateTime = DateTime.Now
Dim pastSixMonths As DateTime = dtNow.AddMonths(-6)
For i As Integer = dtNow.Month To pastSixMonths.Month
Next
can someone help please(no linq please)
Do you want to know how to loop month for month Quantum Leap?