+ 1
How to put actual date into C#
Hey, I’m creating an algorithm what will calculate days till birthday but I do not know how to get real date. Can you help me?
1 ответ
+ 9
Use this to get current date in MM/DD/YYYY:
Console.WriteLine(
DateTime.Today.ToString("d")
);
You can also visit
https://docs.microsoft.com/en-us/dotnet/api/system.datetime.today?view=netframework-4.7.2