当前位置: 代码迷 >> ASP.NET >> ASP.NET怎样获取当前的时间的年月周,该怎么处理
  详细解决方案

ASP.NET怎样获取当前的时间的年月周,该怎么处理

热度:8563   发布时间:2013-02-25 00:00:00.0
ASP.NET怎样获取当前的时间的年月周
获取本机时间,来显示当月的第几周,并可以通过选择月份去联动月份周数。求解!!!!!求代码

------解决方案--------------------------------------------------------
http://topic.csdn.net/u/20070802/09/cd1e204d-7d98-4db3-869e-97360e01b167
------解决方案--------------------------------------------------------
参考
http://www.cnblogs.com/cnhefang/archive/2009/02/13/1390316
------解决方案--------------------------------------------------------
DateTime dt = DateTime.Now();
int year = dt.Year;
int month = dt.Month;
int week = (dt.Day - (new DateTime(year, month, 1)).DayOfWeek) / 7 + 1;
------解决方案--------------------------------------------------------
http://blog.sina.com.cn/s/blog_5cab17130100t4lr
不但告诉你获取 还告诉你 格式
------解决方案--------------------------------------------------------
探讨
DateTime dt = DateTime.Now();
int year = dt.Year;
int month = dt.Month;
int week = (dt.Day - (new DateTime(year, month, 1)).DayOfWeek) / 7 + 1;
  相关解决方案