| Author: Pascal 10 Jan 2009 | Member Level: Gold | Rating:  Points: 1 |
Try using AddDays() to add days. Something like this.
DateTime dt = DateTime.Now; DateTime newDt = dt.AddDays(2);
|
| Author: Babu Akkandi 10 Jan 2009 | Member Level: Diamond | Rating:  Points: 2 |
Hi Thilan Nirodh Dhanapala,
This is Wrong.
In datetime.day is the read only property, here you can't assign any value, but you can read
so use adddays method
Ex:
DateTime DT = Convert.ToDateTime("11/01/2008"); DT= DT.AddDays(4);
Hope it Helps!
Thanks and Regards, Babu Akkandi Microsoft Technology
|