WEEKDAY()
Description
This function returns the weekday index for date (0 = Monday, 1 = Tuesday, … 6 = Sunday).
Syntax
1. > WEEKDAY(date)
Arguments
| Arguments | Description |
|---|---|
| date | Required. |
Examples
1. > drop table if exists t1;
2. > create table t1(a date,b datetime);
3. > insert into t1 values('20220202','2021-12-24 09:23:23');
4. > insert into t1 values('2022-02-02','2021-12-24');
6. > select weekday(a),weekday(b) from t1;
7. +------------+------------+
8. | weekday(a) | weekday(b) |
9. +------------+------------+
10. | 2 | 4 |
11. | 2 | 4 |
12. +------------+------------+
Constraints
The date type supports only yyyy-mm-dd and yyyymmdd for now.
Currently, MatrixOne doesn’t support select function() without from tables.
