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.
jemmysPosted Jan 11, 2005, 4:01 PM
Carlos SanchezPosted Jan 11, 2005, 2:28 PM
jemmysPosted Jan 11, 2005, 2:14 PM