> For the complete documentation index, see [llms.txt](https://docs.nedyx.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nedyx.com/version-1.66/nedyx/clearlines-functions/date-functions/weekday.md).

# 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="/files/UgYEkrZ5fMe5pJXc8t88" 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="/files/y0p1o3u6UGDrxnFp7Co4" 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="/files/CXNfGV8vCXEcaj3gUrxr" alt=""><figcaption></figcaption></figure>
