Day_of_week

sql

FUNCTION Day_of_week(IN dt DATE) RETURN INT;

Parameters

dt date

Description

The Day_of_week functions determines the day of week from the specified date.

Function value

This function returns a number designating day of week, this number ranges from 0 to 6. The 0 value is Sunday, the 6 value is Saturday. If the date has an invalid format, the function returns 7.

See