VBScript WeekdayName Function
Definition and Usage
The WeekdayName function can return the name of the day of the week specified in a week.
Note:In the English Windows environment, the return value is "Sunday", "Monday", ... ...
Syntax
WeekdayName(weekday[,abbreviate[,firstdayofweek]])
Parameters | Description |
---|---|
weekday | Required. The numeric value of the day of the week. |
abbreviate | Optional. Boolean value indicating whether to abbreviate the weekday name. |
firstdayofweek |
Optional. Specifies the first day of the week. The following values can be used:
|
Example
Example 1
document.write(WeekdayName(3))
Output:
Tuesday
Example 2
D = #2007/10/1# document.write(WeekdayName(Weekday(D)))
Output:
Monday
Example 3
D = #2007/10/1# document.write(WeekdayName(Weekday(Date),true))
Output:
Monday or Mon