If you follow me a bit, you are aware of that I jump directly into the subject without saying much so let’s go on.
In order to create a new DateTime object
DateTime myDateTime = DateTime.Now; DateTime myDateTime = DateTime("12/01/1980");
Formatting ….. many options;
myDateTime.To______();
Retrieving parts;
myDateTime.Year // int myDateTime.Hour // int myDateTime.DayOfWeek //Monday myDateTime.DayOfYear //int 1981
DateTime Math:
myDateTime.AddHour(3) myDateTime.AddMinutes(-5)
“Chaining” = using multiple methods together with . operator
myDateTime.AddHour(3).AddMinutes(-5).ToString();