公共函数 ISOweeknum(ByVal v_Date As Date) As Integer
ISOweeknum = DatePart("ww", v_Date - Weekday(v_Date, 2) + 4, 2, 2)
End Function
私有子 CommandButton1_Click()
Dim dt As Date
Dim wno As Integer
dt = Date
Debug.Print dt
wno = ISOweeknum(dt)
MsgBox Format(dt, "yy") & wno
End Sub - Olivia
MsgBox "W" & Format(dt, "yy") & Format(wno, "00.") & Weekday(dt, vbMonday)
- Fadi