bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

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

ParameterDescription
dateRequired. The date or datetime to extract the weekday number from

Technical Details

Works in:From MySQL 4.0

Previous

MySQL WEEK() Function

Next

MySQL WEEKOFYEAR() Function