Given a start date of 1/1/2009 and an end date of 12/31/2009, how can I iterate through each date and retrieve a DateTime value using c#?
Thanks!
Set two variables:
DateTime lowValue = DateTime.Parse("1/1/2009"); DateTime highValue = DateTime.Parse("12/31/2009");
Then, add a day to the low value until it is equal to highvalue:
while (lowValue <= highValue) { //Do stuff here lowValue = lowValue.AddDays(1); }
Or something like that.