Flash cards
Review the key moves
1/4
Core idea
What is the main idea behind MySQL WEEKDAY() Function?
Lesson checks
Practice each idea before moving on
Short Mimo-style checks built from this lesson's code, terms, and sequence.
1Quick choice
Which statement best captures the main point of this lesson?
2Fill blank
Complete the missing token from the example code.
___ WEEKDAY("2017-06-15");3Order
Put the learning moves in the order that makes the concept easiest to apply.
The WEEKDAY() function returns the weekday number for a given date.
Definition and Usage
MySQL WEEKDAY() Function
Example
SELECT WEEKDAY("2017-06-15");Definition and Usage
The WEEKDAY() function returns the weekday number for a given date.
Note
0 = Monday, 1 = Tuesday, 2 = Wednesday, 3 = Thursday, 4 = Friday, 5 = Saturday, 6 = Sunday.
Syntax
WEEKDAY(
date
)Parameter Values
| Parameter | Description |
|---|---|
| date | Required. The date or datetime to extract the weekday number from |
Technical Details
| Works in: | From MySQL 4.0 |
|---|