Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

VBScript WeekdayName Function

VBScript WeekdayName Function


VBScript reference manual Complete VBScript Reference Manual


The WeekdayName function returns the weekday name of a specified day of the week.

Syntax

WeekdayName(weekday[,abbreviate[,firstdayofweek]])

Parameters Description
weekday Required. The number of the day of the week.
abbreviate Optional. A Boolean value indicating whether to abbreviate the weekday name.
firstdayofweek Optional. Specifies the first day of the week.

The following values can be used:

  • 0 = vbUseSystemDayOfWeek - use the Regional Language Support (NLS) API setting
  • 1 = vbSunday - Sunday (default)
  • 2 = vbMonday - Monday
  • 3 = vbTuesday - Tuesday
  • 4 = vbWednesday - Wednesday
  • 5 = vbThursday - Thursday
  • 6 = vbFriday - Friday
  • 7 = vbSaturday - Saturday
  • |

    Example

    Example 1

    Get the name of the 3rd day of the week:

    The example above produces the following output:

    Tuesday

    Try it »

    Example 2

    Get the abbreviation of the 3rd day of the week:

    The example above produces the following output:

    Tue

    Try it »

    Example 3

    Get the name of the 3rd day of the week, with Monday as the first day:

    The example above produces the following output:

    Wednesday

    Try it »


    VBScript reference manual Complete VBScript Reference Manual