| [ Web Proxy ] |
| Viewing: https://riptutorial.com/csharp/example/14841/current-date | [Back] [Original] |
[logo rip]
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.
| Web Proxy Viewer | New URL | Original Page |