如何获得给定日期的当前星期和年份.
问题描述:
如何获得给定日期的当前星期和年份.
范例:我的约会日期为2011年7月23日.
我想显示"27-2011"(第27周)...
如何做到这一点...?
Hi,
How to get current week and year for the given date.
Example : I have the date 23/07/2011.
I want to display "27-2011"(27thWeek-Year)...
How to do this...?
答
使用GetWeekOfYear
获取 ^ ].DateTime.Year
属性应该给您年份.
Use theGetWeekOfYear
to get the week of the year[^].DateTime.Year
property should give you the year.