Dim calCommon As New System.Globalization.GregorianCalendar()
Dim dt As Date = Date.Today
Return calCommon.GetWeekOfYear(dt, System.Globalization.CalendarWeekRule.FirstDay, 0)
MessageBox.show( DateDiff("ww", CDate(year(Date.Today) & "-01-01"), Date.Today))
[此贴子已经被作者于2024/5/24 15:42:36编辑过]
4楼测试了一下,会少一周。2楼是正确的,或者下面也可以
Output.Show(Datepart("ww", Date.Today))