8Kkne‖WeekdayName Function [VBA]

Contents
qWKko‖

# Tsx48‖WeekdayName Function [VBA]

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

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

### FVEx2‖Syntax:

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

### bBBqF‖Return type:

String

### WADQ4‖Parameters:

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

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

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

### EQ6CL‖First day of Week:

kxwYB‖Named constant | Ni66A‖Value | 5Naw7‖Description
--- | --- | ---
vbUseSystemDayOfWeek | 0 | cFuMR‖Use National Language Support (NLS) API setting
vbSunday | 1 | vSYde‖Sunday (default)
vbMonday | 2 | B7qFP‖Monday
vbTuesday | 3 | ABsm8‖Tuesday
vbWednesday | 4 | naCR8‖Wednesday
vbThursday | 5 | Fd4V6‖Thursday
vbFriday | 6 | pMQ9u‖Friday
vbSaturday | 7 | uG94N‖Saturday

### SEjHR‖Error codes:

HGFFD‖None

### EFSA4‖Example:

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

Related Topics

VBA Time and Date functions

Please support us!