|
发表于 2020-6-28 09:00:01
|
显示全部楼层
Private Sub Command1_Click()
Dim dd As Date
dd = CDate("2016-05-01")
Do While (Year(dd) = "2016")
If Weekday(dd, vbMonday) = 6 Or Weekday(dd, vbMonday) = 7 Then
Debug.Print dd; "(周末)"
Else
Debug.Print dd
End If
dd = DateAdd("d", 1, dd)
Loop
End Sub |
|