Current Date

suggest change

To get the current date you use the DateTime.Today property. This returns a DateTime object with today’s date. When this is then converted .ToString() it is done so in your system’s locality by default.

For example:

Console.WriteLine(DateTime.Today);

Writes today’s date, in your local format to the console.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents