# DAYOFWEEK

Extracts the day of the week from a date. Sunday is 1, Monday is 2, etc.

## Syntax

```
DAYOFWEEK (dateobj)

```

## Arguments

* dateobj: a valid date, datetime, or parsable date string.

## Return Type

Integer. If dateobj is not a valid date, returns NULL.

## Examples

```sql
SELECT DAYOFWEEK('2014-04-18');

```

```output

+-------------------------+
| DAYOFWEEK('2014-04-18') |
+-------------------------+
|                       6 |
+-------------------------+

```

***

Modified at: May 31, 2023

Source: [/db/v9.1/reference/sql-reference/date-and-time-functions/dayofweek/](https://docs.singlestore.com/db/v9.1/reference/sql-reference/date-and-time-functions/dayofweek/)

(An index of the documentation is available at /llms.txt)
