How can we obtain the current date in format yyyy.MM.dd
in C# ASP.NET?
using DateTime.Now
How can we obtain the current date in format yyyy.MM.dd
in C# ASP.NET?
using DateTime.Now
Simply by using
string date = DateTime.Now.ToString("yyyy.MM.dd");
See this documentation for more info on custom date and time formats.