Datatime.Now(); //当前时间
DateTime sy = new DateTime();//sy为datetime型sy = System.DateTime.Today;//取当前日期给systring year = sy.Year.ToString();//取年份string month = sy.Month.ToString();//取月份string day = sy.Day.ToString();//取日