WeekDay Function

This function returns the number corresponding to the weekday represented by a serial date number that is generated by the DateSerial or the DateValue functions.

note

This help page describes the WeekDay function used in Basic scripts. If you are interested in the WeekDay function used in LibreOffice Calc, refer to this help page.


Sintaksis:


  WeekDay (SerialDate, [FirstDayOfWeek])

Parameter:

SerialDate: Integer expression that contains the serial date number that is used to calculate the day of the week.

FirstDayOfWeek: Integer value indicating which weekday should be considered as the first day of the week. The default value is 0, meaning that the system locale settings are used to determine the first day of the week.

The parameter FirstDayOfWeek accepts values ranging from 0 to 7. The table below describes the meaning of each possible value:

Nilai

VBA Constant

Deskripsi

0

vbUseSystemDayOfWeek

Use system locale settings

1

vbSunday

Minggu (utama)

2

vbMonday

Senin

3

vbTuesday

Selasa

4

vbWednesday

Rabu

5

vbThursday

Kamis

6

vbFriday

Jumat

7