Method: Weekday for VBS
- Updated2024-09-12
- 1 minute(s) read
Methods > Method: Weekday for VBS
Method: Weekday for VBS
Specifies the day of the week as an integer number.
vWeekday = Object.Weekday(Date, [firstdayofweek])
| Object | VBS Object with this method. You do not need to specify this object. |
| Date | Variant Specifies the date. |
| [firstdayofweek] | Variant Specifies the first day of the week. Possible values are vbSunday, vbMonday, vbTuesday, vbWednesday, vbThursday, vbFriday, and vbSaturday. If you do not specify a value, the method uses vbSunday. |
| vWeekday | Variant Specifies the day of the week as an integer number. Possible values are vbUseSystem, vbSunday, vbMonday, vbTuesday, vbWednesday, vbThursday, vbFriday, and vbSaturday. |
The following example displays the current weekday:
Dim iMyWeekDay, sMyWeekDay iMyWeekDay = Weekday(Now) sMyWeekDay = WeekDayName(iMyWeekDay) Call MsgBox(sMyWeekDay)
See Also
Related Topics
DateAdd | DateDiff | DatePart | DateSerial | DateValue | Date | Day | Hour | Minute | MonthName | Month | Now | Second | TimeSerial | TimeValue | Time | Timer | Weekday | WeekdayName | Year