Date format - C#
//system date
DateTime date = DateTime.Now;
Response.Write(date.ToLongDateString()); // display as Friday, April 25, 2008
Response.Write(date.ToShortDateString()); // display as 4/25/2008
Response.Write(date.ToShortTimeString()); // display as 11:45
Response.Write(date.ToLongTimeString()); // display as 14:57:37
Comments
Post a Comment