Thursday, May 5, 2011

Formatting Date Time in C#



DateTime time = DateTime.Now;
string format = "MMM ddd d HH:mm yyyy";
Console.WriteLine(time.ToString(format));

No comments:

Post a Comment