DateTime.AddDaysDouble
suggest changeAdd days into a dateTime object.
DateTime today = DateTime.Now;
DateTime answer = today.AddDays(36);
Console.WriteLine("Today: {0:dddd}", today);
Console.WriteLine("36 days from today: {0:dddd}", answer);
You also can subtract days passing a negative value:
DateTime today = DateTime.Now;
DateTime answer = today.AddDays(-3);
Console.WriteLine("Today: {0:dddd}", today);
Console.WriteLine("-3 days from today: {0:dddd}", answer);
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents