C# Language DateTime Methods Current Date

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

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.



Got any C# Language Question?