1.这是一种最笨的方法
int i=(int)DateTime.Today.DayOfWeek;
switch(i)
{
case 0:
txtDate.Text="星期天";
break;
case 1:
txtDate.Text="星期一";
break;
case 2:
txtDate.Text="星期二";
break;
case 3:
txtDate.Text="星期三";
break;
case 4:
txtDate.Text="星期四";
break;
case 5:
txtDate.Text="星期五";
break;
……………………
}
2.聪明的方法:
string strWeek = "星期"+"日一二三四五六".Substring((int)System.DateTime.Now.DayOfWeek,1);
3.最好的方法:
string dateString = System.DateTime.Today.ToString("yyyy-M-d dddd", new System.Globalization.CultureInfo("zh-CN"));