C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
MySQL DAYOFWEEK() FunctionThe dayofweek() is a MySQL date/time function. It is used to get the day of the week in numeric. Syntax
select dayofweek(date); Parameter:
Date: date value for getting a day of the week. Returns:This function returns the weekday index for a date value. Example 1
Select dayofweek('2018-09-26');
Output:
Example 2
Select dayofweek('2018-5-12');
Output:
Next TopicMySQL date/time
|