How to Increase a Date?
How can I add 1 day to a Date. I've tried this:
MyDate.Add(new TimeSpan(1,0,0,0))
but it doesn't work. I'm using it into a while statement, like this:
MyDate = DateTime.Now;
FinalDate = dtpFinalDate.Value;
while (MyDate <= FinalDate)
{
//Statement
MyDate.Add(new TimeSpan(1,0,0,0))
}
what am I doing wrong?
thanx in advance.
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

jemmys24 pointsPosted Jan 11, 2005, 9:14 AM EST
Carlos SanchezRank #6,113 · 276 pointsPosted Jan 11, 2005, 9:28 AM EST
jemmys24 pointsPosted Jan 11, 2005, 11:01 AM EST