DAY_OF_WEEK
Determines the day of the week for a given date or datetime, where Monday is 1, Tuesday is 2, and so on
Description
The DAY_OF_WEEK
function calculates and returns the day of the week for a given date or datetime, with Monday represented as 1, Tuesday as 2, and so forth. This is useful for scheduling, date-related analytics, or organizing data by weekdays.
Syntax
DAY_OF_WEEK(date
)
date
: The date or datetime for which you want to determine the day of the week.
Example
Table
Appointment
Appointment Date
Meeting A
8/27/2023
Meeting B
8/28/2023
Meeting C
8/29/2023
Meeting E
8/30/2023
Meeting F
8/31/2023
Meeting G
9/1/2023
Meeting H
9/2/2023
Function
DAY_OF_WEEK(`Appointment Date`)
Results
DAY_OF_WEEK (integer)
7
1
2
3
4
5
6
Last updated