# WEEKDAY

#### Syntax <a href="#syntax.15" id="syntax.15"></a>

**WEEKDAY**(date)

* *date* - the date from which the weekday should be returned *- **Value type**: date*

#### Remarks <a href="#examples.1" id="examples.1"></a>

* The function returns
  * 1 for Sunday
  * 2 for Monday
  * 3 for Tuesday
  * 4 for Wednesday
  * 5 for Thursday
  * 6 for Friday
  * 7 for Saturday
* To convert the weekday numbers into weekday names, the function LOOKUP can be used (see example below).

#### Example <a href="#examples.1" id="examples.1"></a>

<figure><img src="https://1085786630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWv5M2BoEVu0kDIV5EPs4%2Fuploads%2Fgit-blob-a7e7966004612aac0c6df8b6905acfd8eaae9a22%2Fgrafik.png?alt=media" alt=""><figcaption></figcaption></figure>

Any value which can be converted to a date can be used as parameter for the WEEKDAY function, e.g. simple numbers.

<figure><img src="https://1085786630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWv5M2BoEVu0kDIV5EPs4%2Fuploads%2Fgit-blob-1d03af6d41c8b069b58f4aa28ff97b657f20a71a%2Fgrafik.png?alt=media" alt=""><figcaption></figcaption></figure>

The LOOKUP function can be used to retrieve the names of the weekdays, by using a conversion table (colored in green).

<figure><img src="https://1085786630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWv5M2BoEVu0kDIV5EPs4%2Fuploads%2Fgit-blob-345a103cfa3820c619bb6e11fc15814eaf5361d1%2Fgrafik%20(438).png?alt=media" alt=""><figcaption></figcaption></figure>
