PrintDatesTo("08/31/2013")
Sub PrintDatesTo(target As String)
Dim start As Long = DateTime.Now
Dim targetDate As Long = DateTime.DateParse(target)
Dim p As Period
p.Days = 1
Do While (start < targetDate)
Log(DateTime.Date(start))
start = DateUtils.AddPeriod(start, p)
Loop
End Sub
sir erel what if there is no target date? it will automatically generate the 7days
like for exam you set your date to 1/2/2013 then it will display the
1/3/2013
1/4/2013
1/5/2013
1/6/2013
1/7/2013
1/8/2013
I got it! thank erel!
Dim start As Long = DateTime.Now
'Dim targetDate As Long = DateTime.DateParse("08/31/2013")
Dim dateTarget As Long = DateTime.Add(start,0,0,7)
Dim PP As Period
PP.Days = 1
' Do While (start <= targetDate)
Do While (start < dateTarget)
Log(DateTime.date(start))
start = DateUtils.AddPeriod(start, PP)
Loop