Thanks for the help rob, that worked great. I had actually forgot all about DateDiff, although I have used it in the past.
For anyone else who is having this problem, I created the following function
Public Function CalculateDates(ByVal Date1 As Date, ByVal Date2 As Date) Dim MyDateLst As New List(Of Date) Date1 = "27/11/2006" date2 = "01/12/2006" MyDateLst.Add(date1) While DateDiff(DateInterval.Day, date1, date2) > 1 date1 = DateAdd(DateInterval.Day, 1, date1) MyDateLst.Add(Date1) End While MyDateLst.Add(date2) Return MyDateLst End Function
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).