string time = DateTime.Now.ToString("yyyy-MM-dd HH:mm"); 转载于:https://www.cnblogs.com/tiandi/archive/2012/04/16/2451709.html