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.
WEEKDAY(
date)
Parameter | Description |
---|---|
date | Required. The date or datetime to extract the weekday number from |
Works in: | From MySQL 4.0 |
---|
Return the weekday number for the current system date:
SELECT WEEKDAY(CURDATE());
Try it Yourself »
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!