Date Time Object and TimeSpan Types Object

The DateTime and TimeSpan data types also have built-in methods and properties. These class members allow you to perform three useful tasks:

1. Extract a part of a DateTime(for example, just the year) or convert a TimeSpan to a specific representation(Such as the total number of days or total number of minutes).
2. Easily perform date calculations.
3. Determine the current date and time and other information(such as the day of the week or whether the date occurs in a leap year).

No comments:

Post a Comment