WEEKDAY()

Overview

Returns the week day index for a date.

USAGE

WEEKDAY(date)

Argument Name

Description

date

The date to evaluate

DETAILS

WEEKDAY() is a date-time function that returns the weekday index for a date.

The return value begins with 0 for Monday and ends with 6 for Sunday.

A NULL is returned if the argument is NULL.

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

SELECT WEEKDAY('2020-02-01 23:59:59');
+--------------------------------+
| WEEKDAY('2020-02-01 23:59:59') |
+--------------------------------+
|                              5 |
+--------------------------------+
SELECT WEEKDAY('2020-02-01');
+-----------------------+
| WEEKDAY('2020-02-01') |
+-----------------------+
|                     5 |
+-----------------------+

ERROR HANDLING

FEATURE INTERACTION

RESPONSES

DIAGNOSIS

ISO 9075:2016

CHANGE HISTORY

Release Series

History

23.09

  • Present starting in MariaDB Xpand 23.09.1.

6.1

  • Present starting in MariaDB Xpand 6.1.0.

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.1

  • Present starting in MariaDB Xpand 6.1.0.

EXTERNAL REFERENCES