CSharp examples for System:DateTime Format
Format Date Time, yyyy-MM-dd HH:mm:ss
using System.Text; using System.Web.UI; using System;/*from www . j av a 2s. c o m*/ public class Main{ public static string FormattedDateTime(this DateTime time) { return time.ToString("yyyy-MM-dd HH:mm:ss"); } }