Adding a TimeSpan to a given DateTime
- by Amokrane
I just want to add 1 day to a DateTime. So I wrote:
DateTime date = new DateTime(2010, 4, 29, 10, 25, 00);
TimeSpan t = new TimeSpan(1, 0, 0, 0);
date.Add(t);
Console.WriteLine("A day after the day: " + date.ToString());
I tought the result would be: 2010 04 30- 10:25:00 but I'm still getting the initial date.
What's wrong?