c#将时间转化成字符串 var date = new Datetime(); 方式:date.toString("yyyyMMdd"); string.Format("{0:yyyyMMdd}",date);