WeekdayName

Return the named day of the week.

Syntax 
      WeekdayName(DayNum[,Abbreviate [,FirstDayofWeek]])

Key
   DayNum           A date expression

   Abbreviate       Abbreviate the day: Monday>Mon... (TRUE/FALSE)

   FirstDayofWeek   An integer for the first day of the week

DayNum is one of the following constant values:

vbSunday    1
vbMonday    2
vbTuesday   3
vbWednesday 4
vbThursday  5
vbFriday    6
vbSaturday  7

Examples

result = WeekdayName(6)
WScript.Echo result
> Friday

“Name the day of marriage, and God will give thee joy” - Shakespeare

Related VBScript commands

DateAdd - Add a time interval to a Date.
DateDiff
- Return the time interval between two dates.
DatePart
- Return a unit of time from a date.
Weekday - Return the day of the week.
Equivalent in PowerShell: $result = (get-date "12/31/2010").dayofweek


 
Copyright © 1999-2024 SS64.com
Some rights reserved