Logo

Programming-Idioms

History of Idiom 184 > diff from v14 to v15

Edit summary for version 15 by AFS:
[Csharp] Explain Today vs Now

Version 14

2019-09-26, 13:56:56

Version 15

2019-09-26, 14:02:09

Idiom #184 Tomorrow

Assign to variable t a string representing the day, month and year of the day after the current date.

Idiom #184 Tomorrow

Assign to variable t a string representing the day, month and year of the day after the current date.

Code
DateTime t = DateTime.Today.AddDays(1);
Code
DateTime t = DateTime.Today.AddDays(1);
Comments bubble
You can start with DateTime.Today or with DateTime.Now

Today will include the current date, whereas Now will also include the time of day.

if you add 1 day to now, you will get a time of day tomorrow.
e.g. 9:15 AM today plus 1 day = 9:15Am tomorrow