C# Language Current Date


Example

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.