Содержимое

# Функция WeekdayName [VBA]

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

This constant, function or object is enabled with the statement Option VBASupport 1 placed before the executable program code in a module.

### Синтаксис:

            WeekdayName(Weekday as Integer [,Abbreviate as Boolean [,FirstDayofWeek as Integer]])

### Return type:

String

### Параметры:

Weekday: Value from 1 to 7, Monday to Sunday, whose Week Day Name need to be calculated.

Abbreviate: Optional. A Boolean value that indicates if the weekday name is to be abbreviated.

FirstDayofWeek: Optional. Specifies the first day of the week.

### First day of Week:

Именованная константа | Значение | Описание
--- | --- | ---
vbUseSystemDayOfWeek | 0 | Use National Language Support (NLS) API setting
vbSunday | 1 | Sunday (default)
vbMonday | 2 | Понедельник
vbTuesday | 3 | Вторник
vbWednesday | 4 | Среда
vbThursday | 5 | Четверг
vbFriday | 6 | Пятница
vbSaturday | 7 | Суббота

### Коды ошибок:

Нет

### Пример:

            REM  *****  BASIC  *****
            Option VBASupport 1
            Sub Example_WeekdayName
             Dim tgf as Integer
             tgf = 6
             print tgf &" "& WeekdayName(tgf,False,vbSunday)
            End Sub

См. также

Функции даты и времени VBA

Пожалуйста, поддержите нас!