I am using two dateTimePicker’s, and lets say I’ve chosen 11-11-2011 on the first, and 17-11-2011 on the last. Now I want to get the dates between these two dates. I just want to get a result like this:
11-11-2011
12-11-2011
13-11-2011
14-11-2011
15-11-2011
16-11-2011
17-11-2011
How am I supposed to do this ?
I’ve tried to make it out from the question by James Hill, but couldnt figure it out.
Thanks,
Give this a try:
I like using a for-loop for this kind of stuff, since I do often miss them in modern .NET projects 🙂
A possible helper method:
Important If you have a time-portion as well, the condition must be changed to
current.Date <= end.DateEdit Changed so that the boundaries are included, I previously only provided the dates in-between.