public void GetCurrentTime() { DateTime now = DateTime.Now; string timeStr = string.Format("{0:yyyy年MM月dd日}", now); string[] Day = new string[] { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" }; string week = Day[Convert.ToInt32(now.DayOfWeek.ToString("d"))].ToString(); this.lbl_ServerTime.Text = "今天是 " + timeStr + " " + week;//前台lable绑定显示 }