# 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/AivEPE4N5j0seladU4ws" 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/GUVeMp3DkyxP8ecmht6B" 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/caAJOkZLkJY441ZU8RNY" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nedyx.com/nedyx/clearlines-functions/date-functions/weekday.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
