Question:
How can I tell whether the current day is a Saturday or a Sunday?
Solution:
To do so, you must use VBScript‘s Weekday function. This function returns a number that corresponds to the current day of the week: 1 for Sunday, 2 for Monday, 3 for Tuesday, 4 for Wednesday, 5 for Thursday, 6 for Friday, and 7 for Saturday. With this function, plus an If test, you can tell whether it’s Saturday or Sunday.
Example of script:
If Weekday(Now) = 1 Then
MsgBox “Sunday”
ElseIf Weekday(Now) = 7 Then
MsgBox “Saturday”
Else
MsgBox “Neither Saturday nor Sunday”
End If