Date time format like yyyy-MM-dd

Sourav.Kayal
Posted by Sourav.Kayal under C# category on | Points: 40 | Views : 989
using System;
using System.Text;
using System.Globalization;
namespace Test1
{
class Program
{
static void Main(string[] args)
{
DateTime dt = DateTime.Now;
string Formatted = dt.ToString("yyyy/MM/dd");
Console.WriteLine(Formatted);
Console.ReadLine();
}
}
}

Comments or Responses

Login to post response