DateTime dt = DateTime.Now; Response.Write(dt.ToString("yyyyMM")); 转载于:https://www.cnblogs.com/D-Felix/archive/2012/09/07/2674809.html