IBM Lotus Symphony
|
返回一个数字,它对应于由 DateSerial 或 DateValue 函数生成的日期数字字符串所表示的工作日。
WeekDay (Number)
整数
Number:整型表达式,包含用于计算星期几(1-7)的日期数字字符串。
在下面的例子中,在您输入日期时通过使用 WeekDay 函数确定是星期几。
Sub ExampleWeekDay
Dim sDay As String
REM Return and display the day of the week
Select Case WeekDay( Now )
case 1
sDay="Sunday"
case 2
sDay="Monday"
case 3
sDay="Tuesday"
case 4
sDay="Wednesday"
case 5
sDay="Thursday"
case 6
sDay="Friday"
case 7
sDay="Saturday"
End Select
msgbox "" + sDay,64,"Today is"
End Sub