public string ShowTime()
{
string s;
s = DateTime.Now.ToString("D");
string[] x = new string[7] ...{ "日", "一", "二", "三", "四", "五", "六" };
int n;
n = int.Parse(DateTime.Now.DayOfWeek.ToString("D"));
s += " 星期" + x[n] + " " + string.Format("{0:t}", DateTime.Now);
return s;
}
显示日期+星期+时间的实现代码
最新推荐文章于 2021-06-03 20:36:56 发布